Android Target API 31 (Android 12) Update Notice
Follow
Android 12 Application Schedule
Google announced in the Android Developer Notice in June 2022 that all app developers must set the Android Target API of apps released through Google Play to 31 (Android 12) or higher.
For apps that do not comply, app submission may be rejected or review may be returned .
- New app submission: Effective from August 2022
- App update submission: Effective from November 2022
Google always recommends applying the latest Android SDK because every time a new Android version is released, security and performance are improved, enhancing the Android user experience.Please check the Google Developer Documentation below for detailed changes and requirements for the Android12 SDK.
- Meeting the Target API Level Requirements for Google Play
- Behavior Changes: Apps targeting Android 12
Apply Android 12 SDK
To develop and test the operation with Android 12 API, you need to set up the Android 12 SDK in your Android project.
Set up the Android 12 SDK in Android Studio (or the IDE you are using) and modify the app build target.
Install SDK
Refer to the following content to apply the Android 12 SDK to the app.
- Click Tools > SDK Manager in Android Studio
- Select Android 12 from the SDK Platforms tab
- Select Android SDK Build-Tools 31 in the SDK Tools tab
- Click OK to install SDK
-
Modify the module-level build.gradle file of the app as follows
android {
compileSdkVersion 31
defaultConfig {
targetSdkVersion 31
}
}
Apply the latest DFINERY SDK
Apply DFINERY SDK optimized for Android 12 SDK. If the optimization SDK is not applied, some functions may not work properly, or the app may forcibly close .
Install SDK
Add the following dependency to the [ build.gradle (Module: app) ] file.
For more information, please refer to the DFINERY (Adbrix) Integration [Android] document.
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation 'com.android.installreferrer:installreferrer:2.2'
implementation 'io.dfinery:android-sdk:2.5.1.4'
}
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation 'com.android.installreferrer:installreferrer:2.2'
implementation('io.dfinery:android-sdk:2.5.1.4'){
exclude group: 'com.android.support'
}
}
Modify Deep Link/App Link Open Activity Settings
If a component registered in AndroidManifest.xml includes an intent-filter tag, you must set the android:exported option.
In the case where the component receives an event called by another app, it should be set to true .
Therefore, set the android:exported option of the DFINERY Deep Link Open Activity to true as shown below.
<activity
android:name=".MyDeeplinkGateActivity"
android:exported="true"> <!-- <<< Set to true -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="my_scheme"android:host="my_host"/>
</intent-filter>
</activity>
<activity
android:name="com.igaworks.v2.core.application.AbxDefaultDeeplinkActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:noHistory="true"
android:exported="true"> <!-- <<< set to true -->
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Enter the deep link scheme and host. -->
<data android:scheme="your_scheme" android:host="your_host" />
</intent-filter>
<!-- Set the path of the actual deep link activity to be opened by AbxDefaultDeeplinkActivity in android:value. -->
<meta-data android:name="AbxRedirectActivity" android:value="com.my.Activity"/>
</activity>
Modify Push Receiver Settings
If a component registered in AndroidManifest.xml includes an intent-filter tag, the android:exported option must be set.
If the component receives an event called from another app, it should be set to true .
Therefore, set the android:exported option of the DFINERY growth action push listener to true as shown below.
<receiver
android:name="com.igaworks.v2.core.push.notification.AbxPushReceiver"
android:exported="true" <!-- <<< Set to true -->
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.igaworks.v2.core.pushServiceImplement.CLIENT_PUSH_RECEIVE" />
</intent-filter>
</receiver>
FAQ
1. Do I need to update the Target API 31 and the DFINERY SDK together?
- The latest version of DFINERY SDK works properly even without updating to Target API 31.
- When updating to Target API 31 Roll, you must also update the DFINERY SDK to the latest version.
There are changes to the Deeplink / Applink, is there anything that needs to be changed on the DFINERY console side as well?
- No.This Deeplink / Applink update is merely an update to the settings in the Androidmanifest within the app, and there are no changes to the deeplink settings within the DFINERY console.
If you have any further questions, please feel free to reply to this email at any time.
DFINERY Customer Support : support-tracker@adbrixsupport.zendesk.com