mirror of
https://github.com/zhigang1992/react-native-notifications.git
synced 2026-06-11 16:29:42 +08:00
Initialize FirebaseApp - #285
This commit is contained in:
@@ -25,6 +25,8 @@ import com.wix.reactnativenotifications.core.notificationdrawer.IPushNotificatio
|
||||
import com.wix.reactnativenotifications.core.notificationdrawer.PushNotificationsDrawer;
|
||||
import com.wix.reactnativenotifications.gcm.FcmInstanceIdRefreshHandlerService;
|
||||
|
||||
import com.google.firebase.FirebaseApp;
|
||||
|
||||
import static com.wix.reactnativenotifications.Defs.LOGTAG;
|
||||
|
||||
public class RNNotificationsModule extends ReactContextBaseJavaModule implements AppLifecycleFacade.AppVisibilityListener, Application.ActivityLifecycleCallbacks {
|
||||
@@ -32,6 +34,7 @@ public class RNNotificationsModule extends ReactContextBaseJavaModule implements
|
||||
public RNNotificationsModule(Application application, ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
|
||||
FirebaseApp.initializeApp(reactContext.getApplicationContext());
|
||||
if (AppLifecycleFacadeHolder.get() instanceof ReactAppLifecycleFacade) {
|
||||
((ReactAppLifecycleFacade) AppLifecycleFacadeHolder.get()).init(reactContext);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-notifications",
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.2",
|
||||
"description": "Advanced Push Notifications (Silent, interactive notifications) for iOS & Android",
|
||||
"author": "Lidan Hifi <lidan.hifi@gmail.com>",
|
||||
"license": "MIT",
|
||||
|
||||
Reference in New Issue
Block a user