Closed miguelfmlopes91 closed 1 year ago
What do you do on devices below android 13? You don't need to ask for notification permission there.
On devices below android 13 I still ask as it's a design requirement.
On devices below android 13 I still ask as it's a design requirement.
What requirement? Do you have a requirement to ask for permission regardless of Android version? The stacktrace points to Unitys permission code. You should not get there on devices below android 13, as the notification permission is not recognized on those versions, Unity should report denied there.
Closing as no reply.
Hello. Same issue here, but it appears only on devices with android 13-14. We ask the permission as soon as possible on startup. Thanks for help
Non-fatal Exception: java.lang.Exception: AndroidJavaException : java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState android.app.FragmentManagerImpl.checkStateLoss (android.app.FragmentManagerImpl) android.app.FragmentManagerImpl.enqueueAction (android.app.FragmentManagerImpl) android.app.BackStackRecord.commitInternal (android.app.BackStackRecord) android.app.BackStackRecord.commit (android.app.BackStackRecord) com.unity3d.player.UnityPermissions.requestUserPermissions (com.unity3d.player.UnityPermissions) com.unity3d.player.UnityPlayer.nativeRender (com.unity3d.player.UnityPlayer) com.unity3d.player.UnityPlayer.-$$Nest$mnativeRender (com.unity3d.player.UnityPlayer) com.unity3d.player.UnityPlayer$F$a.handleMessage (com.unity3d.player.UnityPlayer$F$a) android.os.Handler.dispatchMessage (android.os.Handler) android.os.Looper.loopOnce (android.os.Looper) android.os.Looper.loop (android.os.Looper) com.unity3d.player.UnityPlayer$F.run (com.unity3d.player.UnityPlayer$F) UnityEngine.AndroidJNISafe.CheckException (UnityEngine.AndroidJNISafe) UnityEngine.AndroidJavaObject._CallStatic (UnityEngine.AndroidJavaObject) Unity.Notifications.Android.PermissionRequest.RequestPermission (Unity.Notifications.Android.PermissionRequest) Unity.Notifications.Android.PermissionRequest..ctor (Unity.Notifications.Android.PermissionRequest.) App.Scripts.Modules.MobileNotifications.Data.AndroidNotificationsPlatform.RequestNotificationPermission (App.Scripts.Modules.MobileNotifications.Data.AndroidNotificationsPlatform)
Hello I've recently upgraded my project to use the 2.1.0 version due to me able to request permission to the users and I've been getting some exceptions on some devices.
Unity Editor version : 2021.3..0f1 mobile.notifications version : 2.1.0
reproducibility: low, currently affects 0.458% of the live population.
devices: Mostly VIVO and OPPO devices. (low tier devices)
Stacktrace: