Relative Content

Tag Archive for react-nativeandroid-14app-actions

Android 14 (SDK 34) Background Activity Launch blocked

Recently, we have upgraded the SDK version of our app to 34 (Android 14) and after the we have noticed that our app is getting launched when the user clicks on the Notification.
Our initial research suggested that there are few restrictions on starting activities from background for Android 14.
We did go through the documentation and tried adding ActivityOptions.setPendingIntentBackgroundActivityStartMode(ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED) to the pending intent that is responsible for starting the main activity on the notification click but this did not work out for us for some reason.
Secondly, we tried asking the user for the “SYSTEM_ALERT_WINDOW” permission but realised that this permission needs to be explicitly given by the user from the settings thereby, hindering our user experience.