You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are the versions of any relevant development tools you are using?
Compose Lifecycle Version 2.8.7,
Gradle 8.7, target and compile sdk 35
Report
What unexpected behavior are you seeing?
When I use UAirship.shared().pushManager.userNotificationsEnabled = true it askes me for the permission (for android > 13) which is fine.
But i have a problem when the permission is already denied.
When I call the above line of code with denied notification permission it triggers a onPause -> onResume for my current lifecycle.
When I allow the notification the lifecycle change doesnt happen.
As I need to refresh some data in the resume case and also need to enable the notification on this place i have the unexpected behaviour because your code is triggering some lifecycle events.
Are there any workarounds for it?
The text was updated successfully, but these errors were encountered:
The reason for this is its not possible for us to query the permission status on Android and know if the permission was previously denied or just not requested yet. On iOS, they have a not_determined state, but Android its just granted or denied. When you enable user notifications and the permission is denied, we start an activity to try to request it. This should only happen on the first enable call though.
We do have a workaround but it puts prompting for the permission on you. If you set isPromptForPermissionOnUserNotificationsEnabled = false on the Airship config, it will prevent our SDK from automatically prompting for the permission when UAirship.shared().pushManager.userNotificationsEnabled = true is called. You will have to prompt for the notification when you determine its necessary, but you can do it in the activity that you are having a lifecycle issue for and it should only go pause -> resume if a system prompt is actually launched to the user.
What Airship dependencies are you using?
18.4.1
What are the versions of any relevant development tools you are using?
Compose Lifecycle Version 2.8.7,
Gradle 8.7, target and compile sdk 35
Report
What unexpected behavior are you seeing?
When I use
UAirship.shared().pushManager.userNotificationsEnabled = true
it askes me for the permission (for android > 13) which is fine.But i have a problem when the permission is already denied.
When I call the above line of code with denied notification permission it triggers a onPause -> onResume for my current lifecycle.
When I allow the notification the lifecycle change doesnt happen.
Code I use for lifecycle tracking:
As I need to refresh some data in the resume case and also need to enable the notification on this place i have the unexpected behaviour because your code is triggering some lifecycle events.
Are there any workarounds for it?
The text was updated successfully, but these errors were encountered: