Android 13

Zendrive SDK v9.0.0 supports Android 13 (targetSDKVersion 33 and compileSDKVersion 33).

  • compileSDKVersion: This refers to the Android version that will be used to compile the Zendrive SDK and the customer application. In order to obtain access to the new APIs introduced in Android 13, customers would need to upgrade the compileSDKVersion of their application to Android 13.

  • targetSDKVersion: This refers to the Android version on which the application was designed and tested.

Impact of Android 13 on Zendrive SDK

This section captures the major changes included in Android 13 and their impact on Zendrive SDK and applications built on top of it. There are no functional changes made to Zendrive SDK in response to the Android 13 OS updates. It is therefore safe for customers to build their applications targeting Android 13 (targetSDK v33) with SDK 8.3.x builds.

Foreground Services (FGS) Task Manager

The FGS task manager in Android 13 provides a new FGS task manager that displays a list of applications that are currently running foreground service. Since Zendrive SDK runs foreground services, users will see your application in the FGS task manager, when the SDK is tracking a trip, as shown in the following screenshot:

Users can choose to stop the application from the notification window itself. If the user chooses to stop the application, one of the following can happen:

  • The ongoing drive can be completely missed.

  • Some parts of the ongoing drive can be missed after the application is stopped.

  • The ongoing trip can split into 2, with some part of the trip missing.

Dismissable Foreground Service Notifications

Users can now dismiss the foreground service notification. There will be no impact on the application's functionality. If customers wish to make this notification persistent, they may use the setOngoing() function call (optional).

Android 13: New Runtime Notification Permission

Android 13 introduces a new runtime permission for posting notifications which mandates a user consent. Zendrive SDK runs a foreground service during drive with an associated notification, which means that the new runtime permission is required to post the notification. In general, this permission can be crucial as notifications help improve user engagement. The following references will help you understand the impact of the new runtime permission:

The new runtime notification permission does not necessitate any changes within Zendrive SDK. The following change is recommended in customer applications:

  • Build a notification permission dialogue box to obtain user consent for displaying notifications at the time of installation.

Battery Resource Utilization

In Android 13 (API level 33) and higher, the OS tries to determine when the customer application will be launched next. The OS uses the time estimation to run prefetch jobs, which the application should use to perform any tasks that need to be done before the next launch.

  • Battery resource utilization provides updated rules on when the OS places your application in the Restricted App Standby Bucket.

  • Android 13 also stipulates new limitations on what an application can do when the user places it in the restricted state for battery usage in the background. No changes are recommended to be made in customer applications.

Was this helpful?