This is a migrated thread and some comments may be shown as answers.

Push notification - orphaned devices

4 Answers 126 Views
Push Notifications
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 23 Apr 2014, 05:00 PM
What happens to devices on the device list that become orphaned?

For example
1) a user installs an app, enables push notifications, and registers the device.
2) the user then later uninstalls the app

I assume that the device will continue to be registered (listed in backend device list) and will still be sent push notifications - although they will not be delivered. Is that correct?

Is there a point in time where these orphaned devices will be removed from the device list?

Also, on a similar topic - is it possible to determine how many push notifications were actually delivered?

Thanks,
David

4 Answers, 1 is accepted

Sort by
0
Accepted
Anton Dobrev
Telerik team
answered on 24 Apr 2014, 09:11 AM
Hello David,

As to your questions:

The current logic of Backend Services adheres to the following:
  • The notification payload along with the tokens is sent to the respective push notification services.
  • The tokens that are already invalid are returned to Backend Services.
  • The devices with the invalid tokens are deleted from the 'Devices' system content type.

There is one iOS specific point:
When the app is uninstalled from the device, and then reinstalled, the device will be registered with a new hardwareId in Backend Services. This is implied by the restrictions that Apple introduced on using the unique device id. In the majority of cases the token of the device stays the same. If the previous registration is still present  push notifications will be received on the same device twice (if there are two device registrations with the same token).

Currently, you can see how many devices fall in the target zone of the push message. You can rely that the created notifications were sent to the respective services. Their servers have a way to determine that device received the notification as they are waiting the response from the device, but there is no 100 % sure mechanism to determine the amount of notifications delivered in the context of Backend Services.

The endpoint for the created notifications is {{ServerHost}}/v1/{{ApiKey}}/Push/Notifications. You can filter the created notifications by "MessageCount", which would be an integer, and "Status", which would be a constant of 20 (Not sent) and 30 (Sent). These fields correspond to the "Devices" and "Status" columns in the administrative grid of the portal. Please note, that the "Devices" (e.g. "MessageCount") value takes a while to aggregate.

Please, let us know what you think of this.

 
Regards,
Anton Dobrev
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
David
Top achievements
Rank 1
answered on 25 Apr 2014, 02:21 AM
Anton,

That's awesome! Thanks for the detailed response.

Thanks,
David
0
David
Top achievements
Rank 1
answered on 01 May 2014, 04:31 PM
A quick follow-up question.

So, from my understanding, an app that has enabled push notifications and was registered, but then uninstalled will result in an invalid token and will, in turn, be deleted from the 'Devices' content-type.

What happens when an app has push notifications enabled and is registered, but the user disables push notifications for that app within Android (Settings / Apps / uncheck Show Notifications) for example. Will that device also be removed from the 'Devices' content type?

Thanks,
David
0
Accepted
Anton Dobrev
Telerik team
answered on 02 May 2014, 12:36 PM
Hello David,

The same logic applies in this scenario as well. The next time a push message is sent to the device, the token will be invalidated and as a result the device will be removed from the backend project.
 
I'd like to mention that we are currently implementing a logic that will mark the device as "active" : false, instead of removing it. We consider that this will improve the overall targeting strategy used by developers. 

Please, let us know if you have further questions.

Regards,
Anton Dobrev
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
Tags
Push Notifications
Asked by
David
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
David
Top achievements
Rank 1
Share this question
or