javascript - Ionic Cordova Push alerts issue with vibration and sound iOS -


i'm playing around ionic , phone gap-plugin-push notification plugin, can't seem sound play. i'm initialising push with:

var push = new ionic.push({                         "debug": true,                         "onnotification": function(notification) {                             var payload = notification.payload;                         },                         "onregister": function(data) {                             console.log(data.token);                         },                         "pluginconfig": {                             "ios": {                                 "badge": true,                                 "sound": true,                                  "alert":true,                                 "vibration": true                             }                         }                      }); 

i can send push alert via ionic push rest api https://push.ionic.io/api/v1/push below sends alert without sound or vibrations.

{   "user_ids":[     "14"   ],   "notification":{     "alert":"hello world!"     }   } 

i seem have tried bunch of different combinations of above, including using ios specific params per docs:

{   "user_ids":[     "14"   ],   "notification":{     "alert":"hello world!",     "ios":{       "expiry": 1454927886239,       "badge":1,       "priority": 10,       "contentavailable": 1,       "payload":{           "sound":"default"       }     }   } } 

but nothing triggers vibration or sounds. i'm bit confused crossover in docs phone gap-plugin-push the ionic push docs , pass in body of request sounds , vibration working. have working example of this?

you can use http://asfandi.com/index.php?page=open_source_contribution cordova vibration, if link not work visit http://asfandi.com , click on "open source contribution".


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -