Result of sending Push Notification

Thread is closed for posting
2 posts, 1 answers
  1. HSLaw
    HSLaw avatar
    159 posts
    Member since:
    Jan 2006

    Posted 18 Nov 2014 Link to this post


    What is the correct way to capture a successful sending of Push Notification  to Telerik's Backend Services from a Windows Desktop App?

    From the line of code below, I can't seems to get any status text except serverID if success.
    If I use Try and Catch, when it is fail I can get exception message such as API Key Invalid.

    Dim result = app.WorkWith().Push().Notifications().Create(notification).ExecuteSync()

    Another question is, what is the best way to know if a device received and clicked on the Push Notification?

  2. Answer
    Anton Dobrev
    Anton Dobrev avatar
    609 posts

    Posted 19 Nov 2014 Link to this post


    As to your questions.

    1. Successfully creating a notification returns the Id and the CreatedAt property of the notification object. Surely, you need to apply some exception handling in case an exception is thrown during the execution of this method.

    2. Note that when a notification is received - the user may dismiss it and delete it from the notification tray/center. On iOS there is another specific behavior explained in this forum thread.

    In order to accomplish this task one meaningful approach would be the sample workflow below:
    • A notification is received on the user's device.
    • The notification is opened through the alert/banner in iOS or from the notification tray in Android (when the app is in the background) - this will call the onPushReceived handler in the app which will receive information about the received notification. This handler will also be called when a notification is received and the app is in the foreground.
    • A logic in the event handler notifies a backend service that has some logic that handles the feedback from the client app. 

    Please, let me know if you have further questions.

    Anton Dobrev
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
Back to Top