How to get Device Token

0 votes
Hi,

Is there anyway to get device token, where i going to use cordova to develop my mobile app, i need to know is there anywhere to get the device token and send to php, in order to get a push notification result?
 

my main problem will be getting device token from mobile, as i try using unity + php to send push notification before, but currently i will use cordova, so i have no idea how to get device token.

Thanks for helping me
asked Jul 9, 2015 in App42PaaS & BPaaS by jianloong92 (10 points)

1 Answer

0 votes

Hello,

As of now there is no direct way to fetch the list of device token from Push Notification service. You can manage it on Storage service, while registering your User for push insert your device token into Storage and fetch it back using our PHP SDK

Please have a look at this link for the same and let me know if it helps.

Thanks,

Himanshu Sharma

answered Jul 9, 2015 by hs00105 (2,005 points)
I dun need to fetch a list of device token, i just want to get the device token through mobile app, once the user play the mobile app at the first time, i need to save/register the device token to the push notification. In addition, i using cordova to develop my mobile application, so i have no idea how can i get the device token and then pass into php to call the push notification
If you are building Android mobile app using phoneGap cordova you can go through with sample available on Git-hub.
 https://github.com/VishnuGShephertz/Android-Push-Notification-in-PhoneGap-application
Hi Vishnu Garg,

Can you provide the sample for ios ? I going to test the android now.

Thanks
Currently we have no sample on iOS using Corodova. In future we can plan for it if based on client requests.
Hi Vishnu Gary,
 
I cant find my PhoneGapActivity.java file
Have you downloaded the sample, it contains PhoneGapActivity.java file in source folder.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...