diff --git a/app/build.gradle b/app/build.gradle
index abec51e..1d414cc 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
+apply plugin: 'io.fabric'
android {
compileSdkVersion 28
@@ -9,8 +10,8 @@ android {
applicationId "com.denizd.substitutionplan"
minSdkVersion 21
targetSdkVersion 28
- versionCode 23
- versionName "2.2.0"
+ versionCode 24
+ versionName "2.2.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
@@ -31,10 +32,11 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-beta01'
implementation 'org.jsoup:jsoup:1.11.3'
implementation 'androidx.cardview:cardview:1.0.0'
- implementation 'androidx.recyclerview:recyclerview:1.1.0-beta01'
+ implementation 'androidx.recyclerview:recyclerview:1.1.0-beta02'
implementation 'com.google.android.material:material:1.1.0-alpha09'
implementation 'com.android.support:customtabs:28.0.0'
+ implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
// implementation 'androidx.core:core-ktx:1.0.2'
@@ -51,6 +53,8 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+ implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
+
// implementation "androidx.work:work-runtime-ktx:2.0.1"
}
diff --git a/app/src/main/java/com/denizd/substitutionplan/Main.kt b/app/src/main/java/com/denizd/substitutionplan/Main.kt
index 055ca03..480389d 100644
--- a/app/src/main/java/com/denizd/substitutionplan/Main.kt
+++ b/app/src/main/java/com/denizd/substitutionplan/Main.kt
@@ -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()
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 2cecaec..b750cc8 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -61,7 +61,7 @@
Ungültiger Code
Experimentalmenü
Diagnosemenü
- Benachrichtigungen und Hintergrund-Synchronisation aktivieren
+ Kursbenachrichtigungen aktivieren
Kein Entfall für dich
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.
Informationen bezüglich deines Gerätes
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index dfabc21..7364666 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -34,7 +34,7 @@
If you\'re in senior phase, please also tell me which courses you\'re enrolled in.
Your courses
Lastly, just a few more settings.
- Receive notifications and enable background sync
+ Receive course notifications
Enable dark mode
Have fun!
diff --git a/build.gradle b/build.gradle
index 6f8611f..6110f96 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,15 +5,15 @@ buildscript {
repositories {
google()
jcenter()
+ maven { url "https://jitpack.io" }
+ maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0-beta02'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.0'
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
+ classpath 'io.fabric.tools:gradle:1.31.0'
}
}
@@ -22,6 +22,7 @@ allprojects {
google()
jcenter()
maven { url "https://jitpack.io" }
+ maven { url 'https://maven.fabric.io/public' }
}
}