Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Push notification to specific device

Hi Aeneas,

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

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

Push notification to specific device

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Push notification to specific device

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

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

Push notification to specific device

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?

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

Push notification to specific device

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

Thanks

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Push notification to specific device

Hi Aeneas,

Thank you for the update! Glad you solved it!

Return to “Issues”