Push Notifications - is it possible to get list of device registrations from cloud?

73 views
Skip to first unread message

Marc M

unread,
Aug 19, 2014, 9:41:59 AM8/19/14
to codenameone...@googlegroups.com
I understand that after calling registerPush a specific device key is sent to the cloud.
When using sendPushMessage with deviceKey=null, the message is sent to all registered devices.
Is there any way to find out what device keys have been registered for a certain application?
Is it possible to deregister devices without the device, or even to deregister all devices for a certain application?

Shai Almog

unread,
Aug 19, 2014, 11:13:01 AM8/19/14
to codenameone...@googlegroups.com
No. There are security issues with exposing this information in any way.
You can register a specific device but not all devices for an app. You will need the key for the specific device to deregister it.

Marc M

unread,
Aug 22, 2014, 5:27:37 AM8/22/14
to codenameone...@googlegroups.com
What would you recommend to do in case the device id is lost or no more valid?
For example, if the app is uninstalled and reinstalled without deregistering first.
I believe on iOS the device id remains the same, but on android it changes.
When sending a notification, both device ids (old and new) would be notified, the user gets two notifications.
(I tried this on android and indeed got two notifications)

Shai Almog

unread,
Aug 22, 2014, 12:11:23 PM8/22/14
to codenameone...@googlegroups.com
When you re-register on the device we will create a new device id for you which should work just fine instead of the previous one. You should register every time the application starts.

Marc M

unread,
Aug 22, 2014, 12:30:24 PM8/22/14
to codenameone...@googlegroups.com
When I re-register on the device, the old device id seems so remain in the cloud.
Now there are two (or more) device ids for the same device in the cloud.
When a notification is sent with deviceKey=null (to all users) the notification is received multiple times on devices that have been re-registered.
When I send explicitly to a deviceKey I do not know which device has been re-registered, so I will also send multiple notifications to the same device.
It would be good if on re-registration the old device id would be deleted from the cloud.
Any hints how to handle situations with re-registered devices?
Is there any way to uniquely identify a device? Then we could send the unique device id together with the push device id to our server, and then replace the existing push device id for the unique device id on the server.

Shai Almog

unread,
Aug 23, 2014, 1:28:09 AM8/23/14
to codenameone...@googlegroups.com
This should be seamlessly removed by our cloud, on which OS did you get duplicate messages?

Marc M

unread,
Aug 24, 2014, 6:10:23 AM8/24/14
to codenameone...@googlegroups.com
Duplicate messages on android only. (On iOS id remains the same on re-register).
Would it help I if tell you a device id on which the problem occurs?

Shai Almog

unread,
Aug 24, 2014, 9:43:28 AM8/24/14
to codenameone...@googlegroups.com
Can you please file an issue on this? We'll have a look if there is a regression there.

Marc M

unread,
Aug 24, 2014, 9:54:36 AM8/24/14
to codenameone...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages