fechanique / cordova-plugin-fcm

Google FCM Push Notifications Cordova Plugin
624 stars 990 forks source link

Notification handler fires only in foreground #131

Open AlexanderSychev opened 7 years ago

AlexanderSychev commented 7 years ago

Plugin triggers any notification, but application can fire if it is in foreground. In background handler is not fires.

shishiroars commented 7 years ago

Its particular in the case of ios

hankchinaski commented 7 years ago

I'm having this issue in android too

edit: no i'm not, sorry it was my bad (i was missing the "FCM_PLUGIN_ACTIVITY" click action)

chrste90 commented 7 years ago

+1

dannywillems commented 7 years ago

@AlexanderSychev Do you still have the issue with the @hankchinaski 's solution? @shishiroars And you?

sonrebmax commented 7 years ago

Maybe need to add this some codes to AppDelegate+FCMPlugin.m ?

http://stackoverflow.com/questions/39600914/push-notification-not-received-when-app-is-in-background-in-ios-10?answertab=active#tab-top

AlexanderSychev commented 7 years ago

@dannywillems _FCM_PLUGINACTIVITY field added, but issue still actual

mbn18 commented 7 years ago

Same issue on IOS

I get the following messages when I run it through Xcode and move the App to the background:

2016-10-22 14:22:47.066715 Infogan Garden App[596:584739] app entered background 2016-10-22 14:22:47.070944 Infogan Garden App[596:584739] Set state background 2016-10-22 14:22:47.071032 Infogan Garden App[596:584739] Disconnected from FCM

From that point I dont get any message. Later I get the message when I enter the App.

Tested with ver 1.1.4 & 1.1.5 on IOS 10

bmwertman commented 7 years ago

I'm seeing the same as @mbn18. Nothing until the app comes to the foreground with the same messages. Also onNotification listener never fires on iOS or Android

blythburgh commented 7 years ago

Hi, I just installed for development and have been firing notifications from the firebase console to a device running my app through Xcode. My log is the same i.e. when app goes to background the log says Disconnected from FCM, but I am getting the notifications to the tray, and I can close the app and still get them while the app settings in Settings allow it. You maybe need to look at your app config and/or device settings for your app. One thing I originally missed was to add remote notifications to the background modes of the app target capabilities.

mbn18 commented 7 years ago

@blythburgh Maybe I did something wrong?

Screen shot from Xcode 8

mbn18 commented 7 years ago

Solved at last. In my case I missed the creation of Provisioning APNs SSL Certificates.

channainfo commented 7 years ago

I have the same problem. the onNotification event is not fired when app in background.

channainfo commented 7 years ago

anyone has any update?

tobika commented 7 years ago

@channainfo if you are on android check this out. #170

chunghoangtu commented 7 years ago

anyone has any update?

juniortarcisio commented 3 years ago

Middle 2020, does anyone has any update about this? I got the same problem with fcm and IOS. On Android and Web I solved it.

AlexanderSychev commented 3 years ago

Middle 2020, does anyone has any update about this? I got the same problem with fcm and IOS. On Android and Web I solved it.

We migrated to "One Signal" Push-service. They have plugin for Cordova.