billsecond
billsecond

Reputation: 612

Xamarin Push Notification, Handling the remote notification once the app becomes active

I know how to send notifications to my iOS devices through PushSharp. However, once I do and the app is inactive, I am looking to find a way to handle the push notification once the app becomes active again.

In other words, I want to be able to see what item they clicked on and be able to show data relevant to that.

Here is a link for reference, it does what I am asking for, but only when the app is active. http://roycornelissen.wordpress.com/2011/05/12/push-notifications-in-ios-with-monotouch/

Upvotes: 0

Views: 501

Answers (1)

Maxim Korobov
Maxim Korobov

Reputation: 2572

Whats the problem?

You have two scenarions:

  1. Push-notification received when app is not launching. If use tap on notification, app will get data in FinishedLaunching handler;
  2. Push-notification received when app is launching. App will get data in ReceivedRemoteNotification handler.

Article in your question shows that processNotification is the same in both scenarios. It shows how to read alert (text)/badge (count)/sound fields and your own custom payload.

Upvotes: 2

Related Questions