Android 14 Behavioral Changes

In this document, we will explain the various Android 14 (API Level 34) behavioral changes that are observed when apps run on Android 14 devices.

Support for Java 11

With the Android 14 release, Google has introduced support for Java 11.
After you install Java 11 on your system, you can provide the path of the JDK in the Java Home field in the Edit > Preferences > Build > Android section of Quantum Visualizer.

Runtime Permission Requests for Foreground Services

With the Android 14 release, Google has introduced new permission requests for Foreground Services. If an app uses Android Target SDK version 34, it must request users for appropriate permissions based on the type of task that the Foreground service performs.
If the Target SDK API level is set as 34, and the app uses any of the APIs related to Foreground Services (such as kony.application.startForegroundService, kony.application.stopForegroundService, kony.application.updateForegroundNotification) in Quantum Visualizer, ensure that you enable support for runtime permissions for locations.
To do so, navigate to Project Settings > Native > Android Mobile / Tablet, and add the ACCESS_FINE_LOCATION or the ACCESS_COARSE_LOCATION permission in the Permissions tab.

The runtime location permission dialog box contains the Allow all the time, Allow only while using the app, Allow only this time/ Ask every time, and Don't Allow options.

Migrate Existing Apps to Android 14

Follow these steps to migrate an existing app to use the Android Target SDK API level 34:

  1. Download the Android SDK Build Tools version 34.0.0, and place it in the <Android SDK path>/build-tools location.
  2. Set the Target SDK Level of the app to Level 34
    To do so, navigate to Project Settings > Native > Android Mobile / Tablet > SDK Versions section, and select 14.0 (34) from the Target SDK drop-down.
  3. Download and install Java 11.
    After you install Java 11, provide the path of the JDK in the Java Home field in the Edit > Preferences > Build > Android section.
  4. Add Location Permissions for foreground services APIs

    If your app uses any APIs related to Foreground Services (such as kony.application.startForegroundService, kony.application.stopForegroundService, kony.application.updateForegroundNotification) in Quantum Visualizer, ensure that you enable support for runtime permissions for locations.
    To do so, navigate to Project Settings > Native > Android Mobile / Tablet, and add the ACCESS_FINE_LOCATION or the ACCESS_COARSE_LOCATION permission in the Permissions tab.

    In addition, you must add the location permissions in the Android Manifest file. To do so, navigate to Project Settings > Native > Android Mobile / Tablet, and add the following entry in the Child Tag entries Under Manifest tag section of the Tags tab:
    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />

Limitations

Following are the limitations for apps that use Android Target SDK version 34:

  • The latest version of Cordova (version 12.0.x) does not support Android Target SDK API Level 34.
    For more information, refer Cordova docs.