So I'm using PushSharp to send notification in c# to my android app :
var push = new PushBroker();
push.RegisterGcmService(new GcmPushChannelSettings(androidKey) { });
push.QueueNotification(
new GcmNotification().ForDeviceRegistrationId(registrationId)
.WithJson("{\"alert\":\"" + PushMessageFormater.FormatMessage(ncRuleResult) + "\",\"badge\":7,\"sound\":\"sound.caf\"}"));
Everything works fine, notification are correctly sent.
Now, all I want to do is to detect from my MainActivity if app is open when the final user tap in a received notification.
protected void onCreate(Bundle savedInstanceState) {
registrationGetter = new RegistrationGetter(this);
super.onCreate(savedInstanceState);
Intent intent = getIntent() ;
// How to check from here if the app is actually open further to a push tap.
}
All I found in SO is that I need to put some extra variable on the Intent, but unfornately, I can't find a way to specify the Intent from PushSharp.
Thank you in advance.