diff --git a/app/build.gradle b/app/build.gradle index 2f4dbde09..6b62642cc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -107,7 +107,7 @@ dependencies { // 应用服务分发 def appCenterSdkVersion = '4.4.5' - implementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}" +// implementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}" // implementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}" implementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}" diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/gallery/detail/GalleryDetailScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/gallery/detail/GalleryDetailScene.java index ffdbc55e8..236c15b5b 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/gallery/detail/GalleryDetailScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/gallery/detail/GalleryDetailScene.java @@ -106,7 +106,6 @@ import com.hippo.ehviewer.ui.scene.history.HistoryScene; import com.hippo.ehviewer.ui.scene.TransitionNameFactory; import com.hippo.ehviewer.ui.scene.gallery.list.GalleryListScene; -import com.hippo.ehviewer.util.AppCenterAnalytics; import com.hippo.ehviewer.util.ClipboardUtil; import com.hippo.ehviewer.widget.ArchiverDownloadProgress; import com.hippo.ehviewer.widget.GalleryRatingBar; @@ -461,7 +460,6 @@ public void onCreate(@Nullable Bundle savedInstanceState) { properties = new HashMap<>(); properties.put("Title", mGalleryInfo.title); properties.put("Time", dateFormat.format(date)); - AppCenterAnalytics.trackEvent("进入画廊详情页", properties); } torrentDownloadHandler = new TorrentDownloadHandler(); diff --git a/app/src/main/java/com/hippo/ehviewer/ui/splash/SplashActivity.kt b/app/src/main/java/com/hippo/ehviewer/ui/splash/SplashActivity.kt index 739b765a3..8ee402c4d 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/splash/SplashActivity.kt +++ b/app/src/main/java/com/hippo/ehviewer/ui/splash/SplashActivity.kt @@ -13,7 +13,6 @@ import com.hippo.ehviewer.ui.EhActivity import com.hippo.ehviewer.ui.MainActivity import com.hippo.ehviewer.ui.dialog.EhDistributeListener import com.microsoft.appcenter.AppCenter -import com.microsoft.appcenter.analytics.Analytics import com.microsoft.appcenter.distribute.Distribute import java.lang.Exception @@ -34,7 +33,6 @@ class SplashActivity : EhActivity() { } AppCenter.start( application, "a47010fb-702a-415a-ad93-ab5c674093ca", - Analytics::class.java, Distribute::class.java ) // AppCenter.start(getApplication(), "feb52710-e245-4820-aebb-a57e00ed806d", // Analytics.class, Crashes.class, Distribute.class); diff --git a/app/src/main/java/com/hippo/ehviewer/util/AppCenterAnalytics.java b/app/src/main/java/com/hippo/ehviewer/util/AppCenterAnalytics.java deleted file mode 100644 index 95ef04ab4..000000000 --- a/app/src/main/java/com/hippo/ehviewer/util/AppCenterAnalytics.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.hippo.ehviewer.util; - -import com.hippo.ehviewer.Settings; -import com.microsoft.appcenter.analytics.Analytics; - -import java.util.Map; - -public class AppCenterAnalytics { - - private static boolean isEnable(){ - return Settings.getEnableAnalytics(); - } - - public static void trackEvent(String name){ - if (isEnable()){ - Analytics.trackEvent(name); - } - } - - public static void trackEvent(String name, Map properties){ - if (isEnable()){ - Analytics.trackEvent(name,properties); - } - } - - public static void trackEvent(String name,Map properties, int flags){ - if (isEnable()){ - Analytics.trackEvent(name,properties,flags); - } - } - -}