Can't Send Push Notifications per Device ID
Hello Miguel! We'll update on this issue as soon as possible.
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Hello Miguel! We'll update on this issue as soon as possible.
By the way, so far I'm using Android devices. I checked the device id with Javascript device.uuid and two different apps to detect device Id. All of them retreve the same id number so I take it like there's no error on the id number I'm using. I've also tried it in 3 different devices with the same result.
Hi Miguel,
device.uuid doesn't coincide with the one the following code must return: codePushNotification.getDeviceUniqueIdentifier();/code
Are you sure you get it running this code?
Hi Katya as Carles says as soon as we use the code you indicate: PushNotification.getDeviceUniqueIdentifier();
The app gets hung up. When we use device.uuid it works fine but as you say the device id it returns might not coincide with the one appery needs to send push notifications by device.
We've followed the tutorials on sending push notifications and everything works fine, both when sending notifications to all devices from the console and using the services. However, it doesn't work when including device id. Not even in the console. We've been stuck with this problem for one week now.
Could you please give us a hand to determine the piece of Javascript code to get the correct device id Appery needs to send pudh notifications per device? If you need it we can share the project.
Thanks
Hello! Here is why your code doesn't work and returns undefined https://getsatisfaction.com/apperyio/...
Try to run the following code on device ready event:
codesetTimeout(function(){alert(localStorage.getItem('pushNotificationDeviceID'))}, 1);/code or on button click run the following code:
codealert(localStorage.getItem('pushNotificationDeviceID'));/code and click this button after a while (when app is loaded)
Thanks a lot. That worked like a treat. Perhaps, it would be a good idea to specify that in the documentations: http://docs.appery.io/tutorials/sendi...
Also it would be good to specidfy that the device id retrieved by device.uuid and other public apps is not exactly the device id Appery needs. I think you would save a few headaches! ![]()
Work fine thanks
is there an easy way to get the device ID used for push notifications?
Hello!
Do you want to get device id in app? No, there is no easier way. Could you clarify what is your specific problem?