Implement startapp ads in aide ide
Tutorial on how to implement startapp ads in aide ide, this is a alternative admob ads. StartApp is a new monetization and distribution platform for Android applications designed to address the challenges the platform has created in terms of revenue generation for developers.
[Toturial 1.1 startapp account set-up]
First create startapp account, after complete register, click menu » my appps » and click the "Add apps"
Next, if your apps is already upload in playstore, just enter the links, if none just click the "click here link below in the input textbox" and fill-up the form.
And click the "add app" and copy your app id.
[Tutorial 1.2 coding]
In your "build.gradle" add this codes:
compile 'com.startapp:inapp-sdk:3.10.1'
Next goto your "AndroidManifest.xml" and add this follwing codes:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_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.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<service android:name="com.startapp.android.publish.common.metaData.PeriodicMetaDataService" />
<service android:name="com.startapp.android.publish.common.metaData.InfoEventService" />
<service android:name="com.startapp.android.publish.common.metaData.PeriodicJobService"
android:permission="android.permission.BIND_JOB_SERVICE" />
<receiver android:name="com.startapp.android.publish.common.metaData.BootCompleteListener" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<activity android:name="com.startapp.android.publish.adsCommon.activities.OverlayActivity"
android:theme="@android:style/Theme.Translucent"
android:configChanges="orientation|keyboardHidden|screenSize" />
<activity android:name="com.startapp.android.publish.adsCommon.activities.FullScreenActivity"
android:theme="@android:style/Theme"
android:configChanges="orientation|keyboardHidden|screenSize" />
import com.startapp.android.publish.adsCommon.*;
StartAppSDK.init(this, "206034124", true);
NOTE: change 206034124 in to your app id that given in your startapp account. that id is my app id.
[Tutorial 1.3 Adding banner ads]
Just copy this code and paste to your activiti layout e.g "main.xml"
<com.startapp.android.publish.ads.banner.Cover
android:id="@+id/startAppCover"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:layout_gravity="center"
android:layout_marginBottom="10dp"/>
For calling startapp interstitial ads use this code:
startAppAd.showAd();
For more documentation about startapp ads please visit this link https://support.startapp.com/hc/en-us/categories/115000508293-SDK
Comments
Post a Comment
Leave a comment hdh