fechanique / cordova-plugin-fcm

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

onNotification best practice #137

Open kevinleequinn opened 7 years ago

kevinleequinn commented 7 years ago

greetings, I am working on capturing notifications as they are tapped.

where would be the best place to put onNotification?

a) right after deviceready b) right after onload c) as processed

(what I mean by c is just have it declared in the javascript outside any function which is before either onload or deviceready)

ilman commented 7 years ago

@kevinleequinn As far as I know FCM variable is only available when the device is ready. So put on top of deviceready function