aboutsummaryrefslogtreecommitdiff
path: root/app/src/google
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-07-20 23:20:05 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-07-20 23:20:05 -0700
commit482357db96cb41c0f8d0c9fac1dc0fb3820ee391 (patch)
treef7ca39de1517e9925c51e8fd874dcf1c2b76bbee /app/src/google
parenta5d426d8cbe3d8c61ccf9ab32a94daf6e2c0bec5 (diff)
downloadetbsa-traccar-manager-android-482357db96cb41c0f8d0c9fac1dc0fb3820ee391.tar.gz
etbsa-traccar-manager-android-482357db96cb41c0f8d0c9fac1dc0fb3820ee391.tar.bz2
etbsa-traccar-manager-android-482357db96cb41c0f8d0c9fac1dc0fb3820ee391.zip
Fix crashes
Diffstat (limited to 'app/src/google')
-rw-r--r--app/src/google/java/org/traccar/manager/GoogleMainApplication.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/google/java/org/traccar/manager/GoogleMainApplication.kt b/app/src/google/java/org/traccar/manager/GoogleMainApplication.kt
index cfeaf6e..1c28987 100644
--- a/app/src/google/java/org/traccar/manager/GoogleMainApplication.kt
+++ b/app/src/google/java/org/traccar/manager/GoogleMainApplication.kt
@@ -49,7 +49,7 @@ class GoogleMainApplication : Application() {
private val broadcastReceiver: BroadcastReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
FirebaseMessaging.getInstance().token.addOnCompleteListener {
- if (it.isComplete) {
+ if (it.isSuccessful) {
broadcastToken(it.result)
}
}