mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-03-27 22:54:59 +08:00
[notifications][android] fix #1527
This commit is contained in:
@@ -152,7 +152,15 @@ public class Utils {
|
||||
appProcess.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND
|
||||
&& appProcess.processName.equals(packageName)
|
||||
) {
|
||||
ReactContext reactContext = (ReactContext) context;
|
||||
ReactContext reactContext;
|
||||
|
||||
try {
|
||||
reactContext = (ReactContext) context;
|
||||
} catch(ClassCastException exception) {
|
||||
// Not react context so default to true
|
||||
return true;
|
||||
}
|
||||
|
||||
return reactContext.getLifecycleState() == LifecycleState.RESUMED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ dependencies {
|
||||
// Cloud Firestore
|
||||
implementation "com.google.firebase:firebase-firestore:17.1.0"
|
||||
// Cloud Messaging / FCM
|
||||
implementation "com.google.firebase:firebase-messaging:17.3.3"
|
||||
implementation "com.google.firebase:firebase-messaging:17.3.2"
|
||||
// Crashlytics
|
||||
implementation('com.crashlytics.sdk.android:crashlytics:2.9.3@aar') {
|
||||
transitive = true
|
||||
|
||||
Reference in New Issue
Block a user