xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.64k stars 1.88k forks source link

[Bug] Start Activity not working for Android 13 #15741

Open aakashsolangi opened 1 year ago

aakashsolangi commented 1 year ago

Description

I am using the Firebase Messaging service for handling Push notifications On notification tapped Intent OnHandleIntent method calls I tried to start the activity of Splash screen it works for Android 10 but not for Android 13 devices.

Steps to Reproduce

  1. Create a Notification Intent
  2. On Notification Tapped OnHandleIntent try to start any activity whether the splash activity or Main activity It did not run for Android 13 devices

Expected Behavior

It should run the splash activity which will run the main activity, Same code worked fine for Android 10 devices but not on Android 13

Actual Behavior

OnHandleIntent Start Activity did not run any activity for Android 13 devices

Basic Information

Environment

Screenshots

image image

Workaround

Not yet

aakashsolangi commented 1 year ago

@jfversluis I have updated the images if you want to have a look. When I tapped the notification in notification intent service OnHandleintent break point hit then i create the intent of splash activity and start activity nothing happens if the device is android 13

jfversluis commented 1 year ago

@aakashsolangi images and a description is a great start, but if this really is to be diagnosed effectively we will need some relevant code and ideally a reproduction project to show the issue.

aakashsolangi commented 1 year ago

@jfversluis I have created a sample application to recreate this issue I also added the postman collection for FCM test as well. You can access the code from here Github

aakashsolangi commented 1 year ago

hey Guys can anyone able to resolve this

bbenetskyy commented 1 year ago

@aakashsolangi inside your code I don't see new required permissions for notifications:

 <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>

https://developer.android.com/develop/ui/views/notifications/notification-permission

Please check this and ensure you use and request all required permissions

aakashsolangi commented 1 year ago

Thanks @bbenetskyy I have posted the notification permission in the manifest as well. But the issue did not resolve with this permission. I have tried it. Also I ma receiving notifications properly there is no issue on receiving notification but tapping on notifications did not work properly

alexshikov commented 9 months ago

@aakashsolangi we experience the same issue. Would you mind sharing a solution if found?

aakashsolangi commented 9 months ago

@alexshikov I was adding intent service earlier in intent now I changed it to app compact activity and it works fine for me