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<>();
|
||||
|
||||
@@ -334,9 +334,7 @@ public class EhApplication extends RecordingApplication {
|
||||
EhDB.mergeOldDB(this);
|
||||
}
|
||||
|
||||
if (Settings.getEnableAnalytics()) {
|
||||
Analytics.start(this);
|
||||
}
|
||||
Analytics.start(this);
|
||||
|
||||
AppCompatDelegate.setDefaultNightMode(Settings.getTheme());
|
||||
|
||||
|
||||
@@ -85,9 +85,8 @@ public class AnalyticsScene extends SolidScene implements View.OnClickListener {
|
||||
Settings.putEnableAnalytics(false);
|
||||
} else if (mAccept == v) {
|
||||
Settings.putEnableAnalytics(true);
|
||||
// Start Analytics
|
||||
Analytics.start(activity.getApplication());
|
||||
}
|
||||
Analytics.setEnabled(Settings.getEnableAnalytics());
|
||||
Settings.putAskAnalytics(false);
|
||||
|
||||
// Start new scene and finish it self
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
<string name="content_layout_restore_tip">Tap to retry</string>
|
||||
<string name="write_rationale">EhViewer will request WRITE_EXTERNAL_STORAGE permission for downloading gallery. Do you want to grant the permission?</string>
|
||||
<string name="you_rejected_me">It hurts</string>
|
||||
<string name="analytics_explain">Would you mind if the developer collected your device information and your usage? It will help the developer a lot and it will also enable the in app updates for you.<br><br>Data analysis service is provided by Microsoft AppCenter. Its privacy policy can be found at <a href="https://privacy.microsoft.com/zh-cn/privacystatement">https://privacy.microsoft.com/zh-cn/privacystatement</a>.<br><br>If you agree to join data analysis, your device information and your usage will be collected, including but not limited to Android API version, equipment model, language residence, the application version, conversion time, function times. The developer promise that these information will NOT be collected, including phone number, e-mail address, IMEI.<br><br>Your information will not be collected until you agree to join data analysis.<br><br>The collected information will be analyzed by Microsoft AppCenter. The analysis report can only be viewed by the developer of this application.</string>
|
||||
<string name="analytics_explain">Would you mind if the developer collected your device information and your usage? It will help the developer a lot.<br><br>Data analysis service is provided by Microsoft AppCenter. Its privacy policy can be found at <a href="https://privacy.microsoft.com/zh-cn/privacystatement">https://privacy.microsoft.com/zh-cn/privacystatement</a>.<br><br>If you agree to join data analysis, your device information and your usage will be collected, including but not limited to Android API version, equipment model, language residence, the application version, conversion time, function times. The developer promise that these information will NOT be collected, including phone number, e-mail address, IMEI.<br><br>Your information will not be collected until you agree to join data analysis.<br><br>The collected information will be analyzed by Microsoft AppCenter. The analysis report can only be viewed by the developer of this application.</string>
|
||||
<string name="get_it">Got it</string>
|
||||
<string name="accept">Accept</string>
|
||||
<string name="reject">Reject</string>
|
||||
|
||||
Reference in new issue
Block a user