inmobi-ad-tracker-iat | Migrating to SDK 9xx
InMobi’s SDK 9xx (iOS 12 and Android 10 compliant), brings a superior monetization opportunity for your apps. The upgrade is super simple with just a drag-n-drop integration coupled with few compliance steps.
The latest version of InMobi SDK supports:
- iOS - minimum iOS 9 and XCode 10.2
- Android - minimum Android 4.1 (API level 16)
Migration prerequisites for iOS
Apple has introduced privacy settings to access WiFi details from iOS 12 onwards. To boost monetization and relevant user experience we encourage sharing WiFi details for targeted advertising. This can be done in three steps as shown below:
Step 1: Enable ‘Access WiFi Information’ on your App ID.
Step 2: Enable access ‘Access WiFi Information’ for your target app from XCode capabilities.
Step 3: Ensure WiFi Access is added to your App.entitlements file.
Migration prerequisites for Android
1. Preparing For Android P
InMobi SDK is compatible with Android P (API level 28), the latest version of the Android platform. In Android P and onwards, apps make connections over HTTPS by default. Though InMobi supports the adoption of HTTPS, the current setup requires our demand partners to support HTTPS as well. The publisher can change their settings to HTTP if it has an impact on the revenue potential.
2. Preparing your app for AndroidX (JetPack)
InMobi SDK is compatible with AndroidX (JetPack) library. In case your app uses the AndroidX library, then follow the standard guidelines by Google for migration by adding both the flags in build file.
It is highly recommended taht you upgrade Android Gradle plugin version to 4.1 or greater to avoid known issues in the jetifier which is fixed in the latest Gradle plugin version. To upgrade Android gradle plugin version, please refer to the Android developer documentation.
3. New Bundle format - aar
Android SDK has moved to a new format bundle, ‘aar’ for ease of integration. With InMobi SDK 800+, you do not need to add InMobiAdActivity into your application manifest.
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
It is highly recommended to include the library from jCenter by adding the following line in your app/build.gradle:
But in case you’re manually integrating the SDK, include the .aar file into the project using the following:
implementation fileTree(dir: 'libs', include: ['*.aar'])
4. Changing the Manifest File (if migrating from SDK < 8XX)
Please remove InMobiAdActivity element from your manifest as aar file will take care of that.
5. Added API(s)
The following API has been added:
public void destroy()
6. Removed APIs
The following legacy APIs have been removed :
public InMobiNative(Context context, long placementId, NativeAdListener listener) public void setNativeAdListener(NativeAdListener listener) public static void requestAd(.......)
public void setListener(BannerAdListener listener) public static void requestAd(.......)
public InMobiInterstitial(Context context, long placementId, InterstitialAdListener2 listener) public void setInterstitialAdListener(InterstitialAdListener2 listener) public static void requestAd(.......)
Note: For the project to compile, please remove any invocation of this API.