Archived
Added Crashlytics
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
package com.denizd.substitutionplan
|
||||
|
||||
import android.app.job.JobInfo
|
||||
import android.app.job.JobScheduler
|
||||
import android.content.ComponentName
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.SharedPreferences
|
||||
@@ -12,7 +9,6 @@ import android.preference.PreferenceManager
|
||||
import android.util.Log
|
||||
import android.view.*
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
@@ -21,6 +17,7 @@ import androidx.core.widget.NestedScrollView
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentTransaction
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
@@ -42,11 +39,17 @@ class Main : AppCompatActivity(R.layout.app_bar_main) {
|
||||
val edit = prefs.edit()
|
||||
val firstTime = Intent(context, FirstTime::class.java)
|
||||
|
||||
val deviceName = DeviceName.with(context).request { deviceInfo, _ ->
|
||||
deviceInfo.marketName
|
||||
}
|
||||
Crashlytics.setUserIdentifier("$deviceName, ${prefs.getString("username", "") ?: ""}")
|
||||
|
||||
if (prefs.getBoolean("firstTime", true)) {
|
||||
// if (true) {
|
||||
startActivity(firstTime)
|
||||
finish()
|
||||
} else {
|
||||
|
||||
if (!prefs.getBoolean("colourTransferred", false)) {
|
||||
MiscData.transferOldColourIntsToString(prefs)
|
||||
edit.putBoolean("colourTransferred", true).apply()
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<string name="invalidCode">Ungültiger Code</string>
|
||||
<string name="experimentalMenu">Experimentalmenü</string>
|
||||
<string name="diagnosticsMenu">Diagnosemenü</string>
|
||||
<string name="notificationsAndSync">Benachrichtigungen und Hintergrund-Synchronisation aktivieren</string>
|
||||
<string name="notificationsAndSync">Kursbenachrichtigungen aktivieren</string>
|
||||
<string name="noSubstitutionsForYou">Kein Entfall für dich</string>
|
||||
<string name="chineseDevicesHelp">Einige chinesische Hersteller, wie Huawei/Honor und Xiaomi, unterdrücken Hintergrund-Services, weshalb Benachrichtungen und Hintergrund-Synchronisation nicht funktionieren.\n\nIch habe feststellen müssen, dass es keine einfache Lösung dafür gibt, die ich einbauen könnte.\n\nStattdessen kannst du jedoch versuchen, App-Optimierungen für diese App zu deaktivieren:\n\nSchließe die App und öffne \"Einstellungen\" -> \"Apps\" -> \"AvH-Plan\" -> \"Akku\" -> \"App-Start\" -> \"Automatisch verwalten\" deaktivieren, \"Im Hintergrund ausführen\" aktivieren.\n\nDies kann unter Umständen keinen Einfluss haben.</string>
|
||||
<string name="chineseDevicesTitle">Informationen bezüglich deines Gerätes</string>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<string name="seniorCourses">If you\'re in senior phase, please also tell me which courses you\'re enrolled in.</string>
|
||||
<string name="yourCourses">Your courses</string>
|
||||
<string name="moreSettings">Lastly, just a few more settings.</string>
|
||||
<string name="notificationsAndSync">Receive notifications and enable background sync</string>
|
||||
<string name="notificationsAndSync">Receive course notifications</string>
|
||||
<string name="enableDarkMode">Enable dark mode</string>
|
||||
<string name="haveFun">Have fun!</string>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user