Xamarin.Forms icon indicating copy to clipboard operation
Xamarin.Forms copied to clipboard

[Bug] Start Activity not working for Android 13

Open aakashsolangi opened this issue 1 year ago • 8 comments

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

  • Android:
  • Affected Devices: Android 13 devices

Environment

Screenshots

image image

Workaround

Not yet

aakashsolangi avatar May 11 '23 02:05 aakashsolangi

@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

aakashsolangi avatar May 11 '23 10:05 aakashsolangi

@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.

jfversluis avatar May 15 '23 08:05 jfversluis

@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 avatar May 16 '23 11:05 aakashsolangi

hey Guys can anyone able to resolve this

aakashsolangi avatar May 18 '23 16:05 aakashsolangi

@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

bbenetskyy avatar May 19 '23 06:05 bbenetskyy

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

aakashsolangi avatar May 19 '23 06:05 aakashsolangi

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

alexshikov avatar Sep 28 '23 12:09 alexshikov

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

aakashsolangi avatar Sep 28 '23 12:09 aakashsolangi