Page 2 of 2

Push notification to specific device

Posted: Wed Jun 25, 2014 10:56 am
by Kateryna Grynko

Hi Aeneas,

This answer from Maryna should be helpful: https://getsatisfaction.com/apperyio/...


Push notification to specific device

Posted: Wed Jun 25, 2014 10:32 pm
by Aeneas McBurney

Sorry I'm not quite clear. I have set up push notifications and when I opened the app on my phone my device ID was written to the Device database table. How do I also write this same ID to my user table so I can link each device to the user?

Thanks,
Aeneas


Push notification to specific device

Posted: Thu Jun 26, 2014 12:18 pm
by Kateryna Grynko

Hi Aeneas,

Add localStorage data in a request parameter (http://devcenter.appery.io/documentat...)
of Create service (http://devcenter.appery.io/documentat...).

Run the following code on this parameter:prereturn localStorage.getItem('pushNotificationDeviceID');/pre


Push notification to specific device

Posted: Thu Jun 26, 2014 10:06 pm
by Aeneas McBurney

THanks but for the device ID to get written to the Devices table is there already a service created for this or do I need to create a separate one and effectively get the Device ID twice? I cannot see any service created on my app to get the Device ID yet it gets into the database. How?


Push notification to specific device

Posted: Fri Jun 27, 2014 5:12 am
by Aeneas McBurney

Please disregard last email as the DeviceID is now working correctly from localStorage.

Thanks


Push notification to specific device

Posted: Fri Jun 27, 2014 5:29 am
by Kateryna Grynko

Hi Aeneas,

Thank you for the update! Glad you solved it!