Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
Fix Home ANR Error
Browse files Browse the repository at this point in the history
  • Loading branch information
moondev03 committed Aug 6, 2024
1 parent 60946c7 commit d4bb2eb
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,10 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
}
}

fun getRegistrationToken(): String? = runBlocking {
return@runBlocking try {
FirebaseMessaging.getInstance().token.await()
fun getRegistrationToken(): String? = try {
FirebaseMessaging.getInstance().token.result
} catch (e: Exception) {
LoggerUtils.w("Fetching FCM Registration Token failed")
null
}
}


}

0 comments on commit d4bb2eb

Please sign in to comment.