Push notification - orphaned devices

5 posts, 2 answers
  1. David
    David avatar
    30 posts
    Member since:
    Sep 2010

    Posted 23 Apr 2014 Link to this post

    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
  2. Answer
    Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 24 Apr 2014 Link to this post

    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.
     
  3. David
    David avatar
    30 posts
    Member since:
    Sep 2010

    Posted 24 Apr 2014 in reply to Anton Dobrev Link to this post

    Anton,

    That's awesome! Thanks for the detailed response.

    Thanks,
    David
  4. David
    David avatar
    30 posts
    Member since:
    Sep 2010

    Posted 01 May 2014 in reply to Anton Dobrev Link to this post

    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
  5. Answer
    Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 02 May 2014 Link to this post

    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.
     
Back to Top