MOA Android SDK to tap into MOA Ad Network.
MOA Android SDK to tap into MOA Ad Network.
flatDir {
dirs 'libs'
}
add the following code in Application build.gradle and sync with gradle
compile(name: 'moaadssdk', ext: 'aar')
compile 'com.squareup.moshi
1.5.0'
compile 'com.squareup.okhttp3
3.8.0'
adsUnitId need to replace with Ads Unit ID from your publisher project at www.moa.com.mm
<com.zeta.moaadssdk.Views.MoaAdsView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/moa_ads_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical|center_horizontal|center"
app:adsUnitId="aid_xxxxxxxxxxxxxx"
></com.zeta.moaadssdk.Views.MoaAdsView>
Fullscreen Ads can be implemented as the following:
adsUnitId need to replace with FullScreen Ads Unit ID
from your publisher project at www.moa.com.mm
int showPerTime =2;
MoaAds moaAds = new MoaAds(this);
moaAds.initFullScreenAds(showPerTime, "fid_xxxxxxxxxxxxx");
with the above example Fullscreen ad will be shown whenever user enters the app the second time.
You can also listen to Ads request status with MoaAdListener as the followingint code
is Http Status code, 400 means error and 204 means rate limited.
You can also use MoaAdsView with the RecyclerView as the following,
PeopleAdapter mPeopleAdapter = new PeopleAdapter();
mPeopleAdapter.setItems(mList);
MoaAdsAdapter moaAdsAdapter = new MoaAdsAdapter(mPeopleAdapter, this, "aid_xxxxxxxxx");
mRecyclerView.setAdapter(moaAdsAdapter);
adsUnitId needs to replace with Ads Unit ID from your publisher project at www.moa.com.mm
Report a bug by creating an issue on our github repo.
Also contact us if you have any difficulties implementing our ad jdk.