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

Result of sending Push Notification

1 Answer 32 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Top achievements
Rank 1
HSLaw asked on 19 Nov 2014, 05:43 AM

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?


1 Answer, 1 is accepted

Sort by
Anton Dobrev
Telerik team
answered on 19 Nov 2014, 12:36 PM

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.
Asked by
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
Share this question