Android Admob SDK AdUnitID for Google play release -
i have used android admob sdk android studio.and test banner ad displayed on app. here used ad unit id developer document.
- can use same adunitid when release app on google play alpha release?
- can use same adunitid when release app on google play production release?
- still didn't created admob account (or) adsense account. have google wallet account, created when register on google play. shall need create admob account , adsense account? or wallet account enough credit on account.
- i have put smart banner ad on app, in basis money credit me,either based on impressions or need touch ad.
is other important point need do,before alpha release (or) production release on google play.
i have pasted code below reference.
mainactivity.java
public class mainactivity extends baseactivity{ @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); adview eadview= (adview) findviewbyid(r.id.adview); adrequest adrequest = new adrequest.builder().build(); eadview.loadad(adrequest); } }
activity_main.xml
<framelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".mainactivity"> <com.google.android.gms.ads.adview android:id="@+id/adview" android:layout_width="match_parent" android:layout_height="wrap_content" ads:adsize="smart_banner" ads:adunitid="@string/banner_ad_unit_id" android:layout_margintop="?attr/actionbarsize" /> ... ... <framelayout>
strings.xml
<string name="banner_ad_unit_id">ca-app-pub-3940256099942544/6300978111</string>
you should
- create admob account
- create admob adunit , it's id
- use id (2) in app.
Comments
Post a Comment