@pabarch wrote:
HI all,
I can't figure it out how to make the onNotification event to run when I receive a notification and the app is in background. I'm using ionic push api v2 and everyhing works fine except for this. Does anyone know if this currently works and if that is the case what "special" options should be send through the notification api?
Example code:
$ionicPlatform.ready(function() { $ionicPush.init({ debug: true, onNotification: function(notification) { $state.go('app.login'); }, onRegister: function(data) { dtlDevice.setToken(data.token); } }); $ionicPush.register(); });
Thanks!!
Posts: 2
Participants: 2