Skip to content
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

Crash when tapping on Android notification #3203

Closed
2 of 7 tasks
radioactiveman opened this issue Nov 14, 2018 · 1 comment
Closed
2 of 7 tasks

Crash when tapping on Android notification #3203

radioactiveman opened this issue Nov 14, 2018 · 1 comment

Comments

@radioactiveman
Copy link

radioactiveman commented Nov 14, 2018

🐛 Bug Report

Tapping notifications (e.g. push notifications) causes an app crash on Android when the app is started.
It is also no bug in Xamarin.Forms because the crash does not occur with a plain Xamarin.Forms solution, without MvvmCross.

Expected behavior

Tapping the notification starts the app without a crash.

Current behavior

Tapping the notification causes the exception below in MainActivity::OnCreate().

System.NotSupportedException: Unable to activate instance of type Xamarin.Forms.Platform.Android.PageRenderer from native handle 0x7fedad6424

Reproduction steps

  • Start the app
  • Click the button "Show notification"
  • Tap on the Android notification

Sample project: App1.zip

Configuration

Version: 6.2.2

Platform:

  • 📱 iOS
  • 🤖 Android
  • 🏁 WPF
  • 🌎 UWP
  • 🍎 MacOS
  • 📺 tvOS
  • 🐒 Xamarin.Forms
@radioactiveman
Copy link
Author

I have finally found a fix. For the activity the launch mode has to be set:

[Activity(..., LaunchMode = LaunchMode.SingleTop, ...)]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant