ostownsville / cordova-plugin-fcm

Google FCM Push Notifications Cordova Plugin
21 stars 17 forks source link

Add support for silent notifications #33

Open Amareis opened 6 years ago

Amareis commented 6 years ago

In https://github.com/Amareis/cordova-plugin-fcm/commit/5f78eeac4286a7bbfe7734b455900f9543e49c2b I made support for silent notifications, using iOS 9 methods. Can we implement it in this fork? It's very useful feature.

Amareis commented 6 years ago

@chrisjpalmer @CowboyCode hey, i see you are active contributors. Can you say something about subj?

luigi37 commented 6 years ago

Hi Amareis. What is the difference versus suppressing sound option in the payload?

blumanski commented 6 years ago

We dropped ios9, silent notifications should work already

Amareis commented 6 years ago

@luigi37 silent notifications is not notifications, what not hears by users. It's when ios awake your app and give it chance to download some info updates from server, just Google "content-available ios"

luigi37 commented 6 years ago

I see so silent both in sound and visualisation, right? Does your code work for both android and Apple?

Amareis commented 6 years ago

@luigi37 when your app sleep in background and notification is arrived, you may want to download some info from server. In android there is no problem, because android always awake your app when notification given, but ios will awake app only if you set "content-available" flag in notification payload

luigi37 commented 6 years ago

I see. Looks interesting

chrisjpalmer commented 6 years ago

Thanks. I will check out your fork and try and implement it. Time frame: 2 weeks, unfortunately I have a paid full time job.

Thanks

Chris