I'm using PushPlugin to handle push notifications inside my cordova application. I want to grab the "regid" value from the plugin and store it inside an AngularJS service so that I can send it alongside a userID value using an Ajax request. I want to do this so I can register the device with my push server along with a user ID for targeted notifications (this sounds pretty standard to me and my client but PushPlugin just won't co-operate). How would I go about referencing the "regid" value correctly outside of the PushPlugin Code?
Asked
Active
Viewed 123 times
1 Answers
0
You can just store the regid in a global variable on the page and then access that variable from your Angular Service.

JoseM
- 4,302
- 2
- 24
- 35
-
as in just "global var", or is it something else? Do you have an example I can look at? – geolaw Sep 04 '14 at 16:27
-
Apparently in PhoneGap you may want to use either sessionStorage or localStorage to save the value, see this answer for more details on usage http://stackoverflow.com/a/20649996/238427 – JoseM Sep 04 '14 at 16:36