Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Push notification when app is open

$
0
0

It is possible. But it's a bit tedious process.

You have to call Parse REST API '/installations' to register your device.

Then you have to do $cordovaPush.register, and in payload specify callback like so for example:
"ecb" : "angular.element(document.querySelector('[ng-app]')).injector().get('PushNotificationService').notify"

$cordovaPush.register will also give you your token, you can then save this token in your backend to target this specific device through parse.com REST api

Then you just console log your PushNotificationService notify method

Note: You will have to add ios certificate in PARSE.com to allow push notifications on iOS and GCM details if you want to target Android.


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>