Page 2 of 3

Can't Send Push Notifications per Device ID

Posted: Thu Sep 19, 2013 11:30 pm
by Alena Prykhodko

Hello Miguel! We'll update on this issue as soon as possible.


Can't Send Push Notifications per Device ID

Posted: Fri Sep 20, 2013 7:51 am
by Miguel Ángel Camacho

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.


Can't Send Push Notifications per Device ID

Posted: Fri Sep 20, 2013 1:32 pm
by Kateryna Grynko

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?


Can't Send Push Notifications per Device ID

Posted: Sat Sep 21, 2013 9:54 pm
by Carles Cabré Boixados

I have this code...

Image

and last alert return undefined...

I don't know what is mistake.


Can't Send Push Notifications per Device ID

Posted: Mon Sep 23, 2013 6:55 am
by Miguel Ángel Camacho

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


Can't Send Push Notifications per Device ID

Posted: Mon Sep 23, 2013 7:47 am
by Maryna Brodina

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)


Can't Send Push Notifications per Device ID

Posted: Mon Sep 23, 2013 9:03 am
by Miguel Ángel Camacho

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! ;)


Can't Send Push Notifications per Device ID

Posted: Mon Sep 23, 2013 10:25 am
by Carles Cabré Boixados

Work fine thanks


Can't Send Push Notifications per Device ID

Posted: Wed Feb 26, 2014 10:16 pm
by danpickard

is there an easy way to get the device ID used for push notifications?


Can't Send Push Notifications per Device ID

Posted: Thu Feb 27, 2014 10:40 am
by Maryna Brodina

Hello!
Do you want to get device id in app? No, there is no easier way. Could you clarify what is your specific problem?