From 633b817d76e8894ed6bd5194c2f150f05a427b2a Mon Sep 17 00:00:00 2001 From: aminecmi Date: Sun, 18 Dec 2022 21:07:42 +0100 Subject: [PATCH] Remonving matomo. --- androidApp/build.gradle.kts | 3 --- .../android/HomeActivity.kt | 6 ------ .../android/LoginActivity.kt | 19 ------------------- .../apps/readerforselfossv2/android/MyApp.kt | 5 ----- .../android/settings/SettingsActivity.kt | 8 -------- .../res/drawable/ic_baseline_insights_24.xml | 7 ------- .../src/main/res/values-ca-rES/strings.xml | 1 - .../src/main/res/values-de-rDE/strings.xml | 1 - .../src/main/res/values-es-rES/strings.xml | 1 - .../src/main/res/values-fa-rIR/strings.xml | 1 - .../src/main/res/values-fr-rFR/strings.xml | 1 - .../src/main/res/values-gl-rES/strings.xml | 1 - .../src/main/res/values-in-rID/strings.xml | 1 - .../src/main/res/values-it-rIT/strings.xml | 1 - .../src/main/res/values-ko-rKR/strings.xml | 1 - .../src/main/res/values-night/strings.xml | 1 - .../src/main/res/values-nl-rNL/strings.xml | 1 - .../src/main/res/values-pt-rBR/strings.xml | 1 - .../src/main/res/values-pt-rPT/strings.xml | 1 - .../src/main/res/values-si-rLK/strings.xml | 1 - .../src/main/res/values-tr-rTR/strings.xml | 1 - .../src/main/res/values-zh-rCN/strings.xml | 1 - .../src/main/res/values-zh-rTW/strings.xml | 1 - androidApp/src/main/res/values/strings.xml | 1 - androidApp/src/main/res/xml/pref_main.xml | 7 ------- .../service/AppSettingsService.kt | 14 -------------- 26 files changed, 87 deletions(-) delete mode 100644 androidApp/src/main/res/drawable/ic_baseline_insights_24.xml diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index d2a572b..556b4ba 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -188,9 +188,6 @@ dependencies { implementation("ch.acra:acra-http:$acraVersion") implementation("ch.acra:acra-toast:$acraVersion") - - // Matomo - implementation("com.github.matomo-org:matomo-sdk-android:4.1.4") } tasks.withType { diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt index 41ec606..ce265fd 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/HomeActivity.kt @@ -1,7 +1,6 @@ package bou.amine.apps.readerforselfossv2.android import android.content.Intent -import android.net.Uri import android.os.Bundle import android.view.Menu import android.view.MenuItem @@ -40,8 +39,6 @@ import kotlinx.coroutines.launch import org.kodein.di.DIAware import org.kodein.di.android.closestDI import org.kodein.di.instance -import org.matomo.sdk.Tracker -import org.matomo.sdk.extra.TrackHelper import java.security.MessageDigest import java.util.concurrent.TimeUnit @@ -72,7 +69,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar override val di by closestDI() private val repository : Repository by instance() private val appSettingsService : AppSettingsService by instance() - private val tracker : Tracker by instance() override fun onCreate(savedInstanceState: Bundle?) { @@ -80,8 +76,6 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar binding = ActivityHomeBinding.inflate(layoutInflater) val view = binding.root - TrackHelper.track().screen("/home").with(tracker) - fromTabShortcut = intent.getIntExtra("shortcutTab", -1) != -1 repository.offlineOverride = intent.getBooleanExtra("startOffline", false) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt index fc6e981..926432a 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt @@ -26,10 +26,6 @@ import kotlinx.coroutines.launch import org.kodein.di.DIAware import org.kodein.di.android.closestDI import org.kodein.di.instance -import org.matomo.sdk.Tracker -import org.matomo.sdk.extra.DimensionQueue -import org.matomo.sdk.extra.DownloadTracker -import org.matomo.sdk.extra.TrackHelper import java.security.MessageDigest @@ -43,17 +39,11 @@ class LoginActivity : AppCompatActivity(), DIAware { override val di by closestDI() private val repository: Repository by instance() private val appSettingsService: AppSettingsService by instance() - private val tracker: Tracker by instance() override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - TrackHelper.track().download() - .identifier(DownloadTracker.Extra.ApkChecksum(applicationContext)) - .with(tracker) - TrackHelper.track().screen("/login").with(tracker) - handleTheme() binding = ActivityLoginBinding.inflate(layoutInflater) @@ -139,15 +129,6 @@ class LoginActivity : AppCompatActivity(), DIAware { private fun goToMain() { CoroutineScope(Dispatchers.Main).launch { repository.updateApiVersion() - - val messageDigest: MessageDigest = MessageDigest.getInstance("SHA-256") - messageDigest.update(appSettingsService.getBaseUrl().toByteArray()) - tracker.userId = String(messageDigest.digest()) - - val mDimensionQueue = DimensionQueue(tracker) - mDimensionQueue.add(1, appSettingsService.getApiVersion().toString()) - - tracker.isOptOut = !appSettingsService.isAnalyticsEnabled() } val intent = Intent(this, HomeActivity::class.java) startActivity(intent) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/MyApp.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/MyApp.kt index 3265c7a..074a5c6 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/MyApp.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/MyApp.kt @@ -35,9 +35,6 @@ import org.acra.data.StringFormat import org.acra.ktx.initAcra import org.acra.sender.HttpSender import org.kodein.di.* -import org.matomo.sdk.Matomo -import org.matomo.sdk.Tracker -import org.matomo.sdk.TrackerBuilder class MyApp : MultiDexApplication(), DIAware { @@ -48,8 +45,6 @@ class MyApp : MultiDexApplication(), DIAware { bind() with singleton { Repository(instance(), instance(), isConnectionAvailable, instance()) } bind() with singleton { ConnectivityStatus(applicationContext) } bind() with singleton { AppViewModel(repository = instance()) } - bind() with singleton { TrackerBuilder.createDefault("https://matomo.amine-louveau.fr/matomo.php", if (BuildConfig.DEBUG) 4 else 5).build( - Matomo.getInstance(applicationContext)) } } private val repository: Repository by instance() diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/settings/SettingsActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/settings/SettingsActivity.kt index 3a50efb..0d54147 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/settings/SettingsActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/settings/SettingsActivity.kt @@ -19,13 +19,9 @@ import bou.amine.apps.readerforselfossv2.android.databinding.ActivitySettingsBin import bou.amine.apps.readerforselfossv2.android.sendSilentlyWithAcraWithName import bou.amine.apps.readerforselfossv2.service.AppSettingsService import com.mikepenz.aboutlibraries.LibsBuilder -import org.acra.ktx.sendSilentlyWithAcra -import org.acra.ktx.sendWithAcra import org.kodein.di.DIAware import org.kodein.di.android.closestDI import org.kodein.di.instance -import org.matomo.sdk.Tracker -import org.matomo.sdk.extra.TrackHelper private const val TITLE_TAG = "settingsActivityTitle" @@ -33,14 +29,10 @@ class SettingsActivity : AppCompatActivity(), PreferenceFragmentCompat.OnPreferenceStartFragmentCallback, DIAware { override val di by closestDI() - private val tracker : Tracker by instance() - override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val binding = ActivitySettingsBinding.inflate(layoutInflater) - TrackHelper.track().screen("/settings").with(tracker) - setContentView(binding.root) if (savedInstanceState == null) { supportFragmentManager diff --git a/androidApp/src/main/res/drawable/ic_baseline_insights_24.xml b/androidApp/src/main/res/drawable/ic_baseline_insights_24.xml deleted file mode 100644 index 99440b9..0000000 --- a/androidApp/src/main/res/drawable/ic_baseline_insights_24.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/androidApp/src/main/res/values-ca-rES/strings.xml b/androidApp/src/main/res/values-ca-rES/strings.xml index 2724d0e..3302cf8 100644 --- a/androidApp/src/main/res/values-ca-rES/strings.xml +++ b/androidApp/src/main/res/values-ca-rES/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-de-rDE/strings.xml b/androidApp/src/main/res/values-de-rDE/strings.xml index b385cbf..3f0d965 100644 --- a/androidApp/src/main/res/values-de-rDE/strings.xml +++ b/androidApp/src/main/res/values-de-rDE/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-es-rES/strings.xml b/androidApp/src/main/res/values-es-rES/strings.xml index 06c9790..f257629 100644 --- a/androidApp/src/main/res/values-es-rES/strings.xml +++ b/androidApp/src/main/res/values-es-rES/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-fa-rIR/strings.xml b/androidApp/src/main/res/values-fa-rIR/strings.xml index c592459..bf135e4 100644 --- a/androidApp/src/main/res/values-fa-rIR/strings.xml +++ b/androidApp/src/main/res/values-fa-rIR/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-fr-rFR/strings.xml b/androidApp/src/main/res/values-fr-rFR/strings.xml index d343ecb..18d47e1 100644 --- a/androidApp/src/main/res/values-fr-rFR/strings.xml +++ b/androidApp/src/main/res/values-fr-rFR/strings.xml @@ -120,7 +120,6 @@ Thème sombre Utiliser les paramètres système Thème clair - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-gl-rES/strings.xml b/androidApp/src/main/res/values-gl-rES/strings.xml index 78ded15..72ddb03 100644 --- a/androidApp/src/main/res/values-gl-rES/strings.xml +++ b/androidApp/src/main/res/values-gl-rES/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-in-rID/strings.xml b/androidApp/src/main/res/values-in-rID/strings.xml index a02a294..1860404 100644 --- a/androidApp/src/main/res/values-in-rID/strings.xml +++ b/androidApp/src/main/res/values-in-rID/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-it-rIT/strings.xml b/androidApp/src/main/res/values-it-rIT/strings.xml index 217080a..2add20d 100644 --- a/androidApp/src/main/res/values-it-rIT/strings.xml +++ b/androidApp/src/main/res/values-it-rIT/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-ko-rKR/strings.xml b/androidApp/src/main/res/values-ko-rKR/strings.xml index 854d980..e66efdf 100644 --- a/androidApp/src/main/res/values-ko-rKR/strings.xml +++ b/androidApp/src/main/res/values-ko-rKR/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-night/strings.xml b/androidApp/src/main/res/values-night/strings.xml index bf5530d..1efdd39 100644 --- a/androidApp/src/main/res/values-night/strings.xml +++ b/androidApp/src/main/res/values-night/strings.xml @@ -1,6 +1,5 @@ - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-nl-rNL/strings.xml b/androidApp/src/main/res/values-nl-rNL/strings.xml index ca23e14..89d3a5a 100644 --- a/androidApp/src/main/res/values-nl-rNL/strings.xml +++ b/androidApp/src/main/res/values-nl-rNL/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-pt-rBR/strings.xml b/androidApp/src/main/res/values-pt-rBR/strings.xml index 9d94cda..bd55fc8 100644 --- a/androidApp/src/main/res/values-pt-rBR/strings.xml +++ b/androidApp/src/main/res/values-pt-rBR/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-pt-rPT/strings.xml b/androidApp/src/main/res/values-pt-rPT/strings.xml index f57a215..ce0d955 100644 --- a/androidApp/src/main/res/values-pt-rPT/strings.xml +++ b/androidApp/src/main/res/values-pt-rPT/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-si-rLK/strings.xml b/androidApp/src/main/res/values-si-rLK/strings.xml index 74ed3dd..d6b78c2 100644 --- a/androidApp/src/main/res/values-si-rLK/strings.xml +++ b/androidApp/src/main/res/values-si-rLK/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-tr-rTR/strings.xml b/androidApp/src/main/res/values-tr-rTR/strings.xml index 588e206..af22925 100644 --- a/androidApp/src/main/res/values-tr-rTR/strings.xml +++ b/androidApp/src/main/res/values-tr-rTR/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values-zh-rCN/strings.xml b/androidApp/src/main/res/values-zh-rCN/strings.xml index b2bbe80..6170862 100644 --- a/androidApp/src/main/res/values-zh-rCN/strings.xml +++ b/androidApp/src/main/res/values-zh-rCN/strings.xml @@ -120,7 +120,6 @@ 深色模式 遵循系统设置 浅色模式 - 启用分析 该应用不分享任何关于您的个人数据。 发生崩溃。请将细节发送给开发人员。 diff --git a/androidApp/src/main/res/values-zh-rTW/strings.xml b/androidApp/src/main/res/values-zh-rTW/strings.xml index 0457e1b..6def4c4 100644 --- a/androidApp/src/main/res/values-zh-rTW/strings.xml +++ b/androidApp/src/main/res/values-zh-rTW/strings.xml @@ -120,7 +120,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml index dfc256d..176f930 100644 --- a/androidApp/src/main/res/values/strings.xml +++ b/androidApp/src/main/res/values/strings.xml @@ -123,7 +123,6 @@ Dark mode Follow the system setting Light mode - Enable analytics The app does not share any personal data about you. A crash occured. Sending the details to the developper. diff --git a/androidApp/src/main/res/xml/pref_main.xml b/androidApp/src/main/res/xml/pref_main.xml index 8bb2b7d..0fcea31 100644 --- a/androidApp/src/main/res/xml/pref_main.xml +++ b/androidApp/src/main/res/xml/pref_main.xml @@ -38,13 +38,6 @@ android:icon="@drawable/ic_widgets_black_24dp" /> - - -