ostownsville / cordova-plugin-fcm

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

Vibrate #27

Closed luigi37 closed 6 years ago

luigi37 commented 6 years ago

Vibrate option does not seem to work in Android...

neither at the level of "title":

'title' =>"mytitle",
                    'body'  => "myobdy"
                    'sound' =>  "default", //If you want notification sound
                    'vibrate'   => "1",
                    'click_action'  => "FCM_PLUGIN_ACTIVITY",  //Must be present for android

nor at level of priority:

registration_ids' => $newId, //$registrationIds,
                    //'message'     => 'here is a message. message',
                    'vibrate'   =>"1"
                    'priority'  => 'high',  
                    'notification'  => $msg,
                    'data' => $data
CowboyCode commented 6 years ago

There is no vibration in the firebase fcm documentation, as far I can see.... Apparently, if the sound is off, on the device, it will vibrate. But a payload 'vibrate' => true is ignored.

Take a look at this discussion, fcm plugin for react-native

https://github.com/evollu/react-native-fcm/issues/53

chrisjpalmer commented 6 years ago

Can we close this?

luigi37 commented 6 years ago

Yep. No option to make it vibrate unless you put volume to zero on android