This plugin provides an implementation of InMobi Native Interstitial Ad.
Note: steps you should take.
cordova plugin add com.setlevel.inmobi
or
cordova plugin add https://github.com/Blah2014/phonegap-inmobi-plugin
phonegap local plugin add https://github.com/Blah2014/phonegap-inmobi-plugin
plugman --platform ios --project ./platforms/ios --plugin https://github.com/Blah2014/phonegap-inmobi-plugin
<script>
InMobi.showAd();
</script>
Download latest InMobi SDK for iOS
Drag and drop under Xcode project Libs folder from downloaded iOS SDK 4.x
You will need to add some optional and mandatory frameworks to your Xcode project for the SDK to work correctly. The frameworks required to compile the InMobi SDK 4.x monetization library are given below:
If you use iOS 8, please add the NSLocationWhenInUseUsageDescription flag to your info.plist file.
Add the -ObjC flag to the Other Linker Flags. To do so, perform the below steps:
In CDVInMobi.m replace "Insert InMobi property ID here" in two places with your siteID from InMobi property.
Download latest InMobi SDK for Android
Copy the InMobi-4.x.x.jar file to your project by performing the steps given below.
To add the JAR files to your project, perform the following steps:
Include the below within the <application> tag.
<activity android:name="com.inmobi.androidsdk.IMBrowserActivity"
android:configChanges="keyboardHidden|orientation|keyboard|smallestScreenSize|screenSize"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:hardwareAccelerated="true" />
Include the below within the <manifest> tag.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.READ_CALENDAR"/>
<uses-permission android:name="android.permission.WRITE_CALENDAR"/>
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
In CDVInMobi.java replace "Insert InMobi property ID here" in two places with your siteID from InMobi property.