Skip to content

Commit 0192b44

Browse files
author
Joseph Dibble
committed
ARCore Android SDK v1.37.0
1 parent 429ee46 commit 0192b44

File tree

456 files changed

+285970
-3434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

456 files changed

+285970
-3434
lines changed

LICENSE

Lines changed: 826 additions & 2 deletions
Large diffs are not rendered by default.

libraries/include/arcore_c_api.h

Lines changed: 1598 additions & 132 deletions
Large diffs are not rendered by default.

samples/augmented_faces_java/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ android {
4141

4242
dependencies {
4343
// ARCore (Google Play Services for AR) library.
44-
implementation 'com.google.ar:core:1.36.0'
44+
implementation 'com.google.ar:core:1.37.0'
4545

4646
// Obj - a simple Wavefront OBJ file loader
4747
// https://github.com/javagl/Obj
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright 2023 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.google.ar.core.examples.java.common.helpers;
17+
18+
import android.content.Context;
19+
import android.content.SharedPreferences;
20+
21+
/**
22+
* A class providing persistent EIS preference across instances using {@code
23+
* android.content.SharedPreferences}.
24+
*/
25+
public class EisSettings {
26+
public static final String SHARED_PREFERENCE_ID = "SHARED_PREFERENCE_EIS_OPTIONS";
27+
public static final String SHARED_PREFERENCE_EIS_ENABLED = "eis_enabled";
28+
private boolean eisEnabled = false;
29+
private SharedPreferences sharedPreferences;
30+
31+
/** Creates shared preference entry for EIS setting. */
32+
public void onCreate(Context context) {
33+
sharedPreferences = context.getSharedPreferences(SHARED_PREFERENCE_ID, Context.MODE_PRIVATE);
34+
eisEnabled = sharedPreferences.getBoolean(SHARED_PREFERENCE_EIS_ENABLED, false);
35+
}
36+
37+
/** Returns saved EIS state. */
38+
public boolean isEisEnabled() {
39+
return eisEnabled;
40+
}
41+
42+
/** Sets and saves the EIS using {@code android.content.SharedPreferences} */
43+
public void setEisEnabled(boolean enable) {
44+
if (enable == eisEnabled) {
45+
return;
46+
}
47+
48+
eisEnabled = enable;
49+
SharedPreferences.Editor editor = sharedPreferences.edit();
50+
editor.putBoolean(SHARED_PREFERENCE_EIS_ENABLED, eisEnabled);
51+
editor.apply();
52+
}
53+
}
2.32 KB
Binary file not shown.

0 commit comments

Comments
 (0)