Enable in app updates without analytics
This commit is contained in:
4 files changed
+8
-6
No files matched your search
@@ -31,6 +31,7 @@ public final class Analytics {
|
||||
public static void start(Application application) {
|
||||
AppCenter.start(application, "1aa06805-037c-4f3c-8aaa-e23d1433986d", com.microsoft.appcenter.analytics.Analytics.class, Crashes.class, Distribute.class);
|
||||
AppCenter.setUserId(Settings.getUserID());
|
||||
com.microsoft.appcenter.analytics.Analytics.setEnabled(Settings.getEnableAnalytics());
|
||||
Crashes.setEnabled(!BuildConfig.DEBUG);
|
||||
Distribute.setEnabledForDebuggableBuild(false);
|
||||
}
|
||||
@@ -39,6 +40,10 @@ public final class Analytics {
|
||||
return AppCenter.isConfigured() && Settings.getEnableAnalytics();
|
||||
}
|
||||
|
||||
public static void setEnabled(boolean enabled) {
|
||||
com.microsoft.appcenter.analytics.Analytics.setEnabled(enabled);
|
||||
}
|
||||
|
||||
public static void onSceneView(SceneFragment scene) {
|
||||
if (isEnabled()) {
|
||||
Map<String, String> properties = new HashMap<>();
|
||||
|
||||
Reference in new issue
Block a user