Android: fixed issue where activity was being recreated for local not…
…ifications
added a way to specify an optional Intent Filter Action property to avoid starting with MainLauncher Activity added notification Id parameter to activity Extras
Just recreated PR from https://github.com/edsnider/Xamarin.Plugins/pull/35
Do you have steps that reproduce the problem that this is solving?
As said here https://github.com/edsnider/Xamarin.Plugins/issues/28
I run the app, launch scheduled local notification, click on the notification icon: then the app close and recreate self, then crashes.
Tried on various Android device (Lollipop or Marshmallow).
Ok, does this happen in Xamarin.Forms or traditional Xamarin.Android, or both? I can't reproduce the issue with the sample application, but maybe it's too simple of an app.
I've only tried with Forms.
Hello.
Maybe I have the same issue. My XF apps crashes every time the user taps on the notification. This happens on many different devices including XS debugger with different API levels.
Are you planning to merge this pull request?
@edsnider, @jamesmontemagno do you plan to merge these requests and deploy an updated Nuget package?
Thank you very much. -m
I haven't been able to reproduce the bug this PR is attempting to address, can you point me to a repo or some sample code that is seeing the error?
Hi @edsnider. Thank you for your answer. Yes of course, I will update this thread soon with the log of the exception. I also will try to reproduce the same behavior in a simple app (not easy but I will try).
I will be back soon with some more information.
I had the same problem. I used the code from this commit: https://github.com/edsnider/LocalNotificationsPlugin/pull/4/commits/f6c700df38c79be6c6982d3fe57bcb06bf8415d7 And the behavior after the transition from the notification was expected.
Please update the NuGet package.
@edsnider I believe the sample in this repo demonstrates the original behavior (not the crash), however I wasn't able to get it to build to confirm. So, here is a repo that contains the sample, but updated to the latest Xamarin Forms and plugin versions, along with LaunchMode = SingleTop on the activity:
https://github.com/GalaxiaGuy/localnotificationssample
When you tap on the notifications triggered by the app, the activity is recreated, instead of the existing activity being reused.