Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Automatically updating deviceID when it changes on a device

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?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Automatically updating deviceID when it changes on a device

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.

Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Automatically updating deviceID when it changes on a device

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?

Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Automatically updating deviceID when it changes on a device

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.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Automatically updating deviceID when it changes on a device

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

No.

Image

Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Automatically updating deviceID when it changes on a device

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.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Automatically updating deviceID when it changes on a device

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...

Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Automatically updating deviceID when it changes on a device

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?

Paul Medawar
Posts: 0
Joined: Thu Apr 03, 2014 10:55 am

Automatically updating deviceID when it changes on a device

Hi, is there any progress on this?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Automatically updating deviceID when it changes on a device

Paul, could you please elaborate your issue.

Return to “Issues”