Android Target API 31 (Android 12) update notice
Follow
Android 12 implementation schedule
Google announced in a June 2022 Android Developer Notice that all app developers must set the Android Target API of apps released through Google Play to 31 (Android12) or higher.
Apps that do not comply with these guidelines may have their application rejected or rejected during review .
- 2820398
- Submit app updates: Effective from November 2022
Since each new Android version is released with improved security and performance and an improved Android user experience, Google always recommends applying the latest Android SDK. For detailed changes and requirements for Android 12 SDK, please check the Google Developer Documentation below.
Apply Android 12 SDK
To develop and test behavior with the Android 12 API, you need to set up the Android 12 SDK in your Android project.
Set up the Android12 SDK in Android Studio (or whatever IDE you are using) and edit the app build target.
Install SDK
Apply the Android 12 SDK to your app by referring to the information below.
- Click Tools > SDK Manager in Android Studio.
- Select Android 12 in the SDK Platforms tab
- In the SDK Tools tab, select Android SDK Build-Tools 31
- Click OK to install SDK
-
Modify the app's module-level build.gradle file as shown below.
android {
compileSdkVersion 31
defaultConfig {
targetSdkVersion 31
}
}
Apply the latest DFINERY SDK
Apply DFINERY SDK optimized for Android 12 SDK. If you do not apply the optimization SDK, some functions may not work properly or the app may be forcibly closed .
Install SDK
Add dependency to the [ build.gradle (Module: app) ] file as follows.
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.0.9'
}
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.0.9'){
exclude group: 'com.android.support'
}
}
Edit deep link/app link open activity settings
If a component registered in AndroidManifest.xml includes an intent-filter tag , the android:exported option must be set.
2820404
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 schema 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 by another app, it must 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 Target API 31 and DFINERY SDK at the same time?
- The latest version of DFINERY SDK operates normally even without the Target API 31 update.
- However, when updating Target API 31 roll, DFINERY SDK must also be updated to the latest version.
2. There are changes in Deeplink / Applink. Are there any changes that need to be made to the DFINERY console as well?
- no. This Deeplink / Applink update is only a setting update on the Androidmanifest within the app, and there are no changes to the deeplink settings within the DFINERY console.
If you have any additional questions, please reply to this email at any time.
DFINERY Customer Support: support-tracker@adbrixsupport.zendesk.com