-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Push: Open application Activity after the click on the notification #20
Comments
Right now it loads the activity in launch mode. Yes i am planning to add some code so that you can setup which activity to load, just haven't had the time to figure out the best way to do this. |
this is really important, any update on this request? |
can you review the pull request I submitted? I've tested this locally and it works as expected for us. |
Has this been implemented now? I get the notification to the device and IPushNotificationListener.OnMessage fires with the correct payload. I'm fairly new to Android so wondering if there's some boilerplate I can hack to respond to notifications being clicked, and directing the user to a custom Notification activity |
+1 |
Rendy updated the code a while back that allows the android payload to be accessed, @CR4567: did you grab latest and try it out? |
thanx for the quick answer. |
apologies, I should have been more specific, yes, the library lets you access the payload once the notification was clicked. The notification should/will fire OnCreate if your app isn't running. In that method, check Intent.Extras. If extras isn't null, there should be a KeySet collection that has the values you can use to handle any downstream decisions about what to load. hth |
hm.... weird... you're absolutely right, the onCreate fires when clicking the msg and there is also an Intent.Extras with isEmpty = false.... but I still can't find the values of the notification. |
inside OnCreate:
|
Ah nice. that's working. Thx a lot... couldn't see the content in debug mode but seems to be a debug problem. |
after all that time, thinking everything is fine, I found some new and weir behavior... I mixed this code with #39 to receive and react on push notifications even when app is closed. Does that make sense to anyone? Is it using a different service or thread after closing the app? |
Is there any update? |
Any updates on this? I really need this feature :( |
I also need this feature. |
Any update? I need to open a specific screen when I click the notification on Android. Is it already possible? |
I am on version 1.2.4. You can access the message with the method @jmeadecvlt mentioned, I use this inside OnCreate in MainActivity.cs
|
Rendy, is any way how to set an Activity which is called after the click on the notification?
Or open the main Activity of the app?
Or do you plan to add it to the code? (for ex. like here: https://developer.xamarin.com/guides/cross-platform/application_fundamentals/notifications/android/local_notifications_in_android_walkthrough/ )
The text was updated successfully, but these errors were encountered: