I've got IonicPush push notifications working on my device but if I send through a mp3 sound path then its ignored. I have a quick look into https://github.com/driftyco/ionic-service-push-client/blob/master/ionic-push.js and suspect that window.Media on line 185 might be undefined.
$ionicPush.register({
canShowAlert: false, //Should new pushes show an alert on your screen?
canSetBadge: true, //Should new pushes be allowed to update app icon badges?
canPlaySound: false, //Should notifications be allowed to play a sound?
canRunActionsOnWake: true, // Whether to run auto actions outside the app,
onNotification: function(notification) {
return true;
}
}
Has anyone else gotten it to work?
Ok so I got it to work, it was entirely my fault and I will now close this issue. For anyone in the future with the same problem. The following might be useful.
1) Make sure you add ng-cordova to the app module
angular.module('yourAppName', ['ionic', 'ngCordova', 'yourAppName.controllers', 'yourAppName.services', 'ionic.service.core', 'ionic.service.push'])
2) Make sure you put the mp3 file inside the www directory and reference it with a relative url.
If you still have problems try emulate the app using ionic emulate ios -lc
to view any js errors in the console.