Page 1 of 3

Automatically updating deviceID when it changes on a device

Posted: Sun Jun 07, 2015 9:53 am
by Paul Medawar

Hi,

I asked a question here, which was not really resolved

https://getsatisfaction.com/apperyio/...

so I will try and be clearer.

How do I ensure that the deviceID is updated in the "Devices" collection whenever it changes on a device?


Automatically updating deviceID when it changes on a device

Posted: Sun Jun 07, 2015 10:47 am
by Illya Stepanov

Hi Paul -

All process and what is possible is described in our documentation here: https://devcenter.appery.io/documenta...

Other custom implementations with obtaining Device ID can be developed by you with your own Push service integration.


Automatically updating deviceID when it changes on a device

Posted: Sun Jun 07, 2015 11:13 am
by Paul Medawar

Hi Illya,

I have read the documentation but it doesn't answer my question.

It is clear to me that when a new device loads my app, the deviceID, Token and Type are created automatically by Appery in the "devices" collection"

What is not clear is what happens within Appery's "Devices" collection when a deviceID changes on a device.

Should the deviceID be updating automatically by Appery when the deviceID changes?


Automatically updating deviceID when it changes on a device

Posted: Sun Jun 07, 2015 11:20 am
by Paul Medawar

I have a checkboxgroup in my app which is referencing deviceID (obtained from the LSV "pushNotificationDeviceID") to update the array "channels" in devices collection.

This is working great...until the "deviceID" changes on the device, and the device no longer matches a "deviceID" in the devices collection.


Automatically updating deviceID when it changes on a device

Posted: Sun Jun 07, 2015 11:26 am
by Illya Stepanov

[quote:]
Should the deviceID be updating automatically by Appery when the deviceID changes?
[/quote]

No.

Image


Automatically updating deviceID when it changes on a device

Posted: Sun Jun 07, 2015 11:41 am
by Paul Medawar

I have already stated that I understand that when

"first launched from a device, a new record with the deviceID of the phone that the application was launched from is added to the devices collection"

when I wrote

"It is clear to me that when a new device loads my app, the deviceID, Token and Type are created automatically by Appery in the "devices" collection"

You recommend in your documentation

"To target a specific ID use deviceID instead of a token because a token is issued by Apple/Google services and can be changed."

My issue is that the deviceID is also changing on a device (say when the app is deleted or updated)! so your documentation is not accurately representing this issue, and I'm trying to understand how best to approach it.


Automatically updating deviceID when it changes on a device

Posted: Sun Jun 07, 2015 2:48 pm
by Illya Stepanov

Paul -

In this case you need to create such logic in your app using Update device/Unregister device as described here:

https://devcenter.appery.io/documenta...
https://devcenter.appery.io/documenta...


Automatically updating deviceID when it changes on a device

Posted: Sun Jun 07, 2015 3:14 pm
by Paul Medawar

I understand the tutorials and I am already using the Update Device to update the "channels" array column.

The problem is that as you describe in your documentation:

"To target a specific ID use deviceID instead of a token because a token is issued by Apple/Google services and can be changed."

how can I use deviceID as a target, when it has changed on the phone?


Automatically updating deviceID when it changes on a device

Posted: Mon Jun 08, 2015 7:18 am
by Paul Medawar

Hi, is there any progress on this?


Automatically updating deviceID when it changes on a device

Posted: Mon Jun 08, 2015 7:36 am
by Illya Stepanov

Paul, could you please elaborate your issue.