Today We are going to learn how to set interstitial Ads for android.
Our Steps of work describe below.
Creating An Android Project
Open your android studio and under File>New>New Project and name your Interstitial Demo. Press next and keep as it is and press next select Empty Activity. Then press next and then finish.
Editing build.gradle
Now we need to edit build.gradle file.
Open build.gradle file and under Dependencies add this simple code and press sync now.
Editing AndroidManifest.xml
Now Open AndroidManifest.xml file do some coding....
First add two permission
First add two permission
Then Under Application add these meta-data
Under Application also add these activity code
That's enough for AndroidManifest.xml
Editing string.xml
Under res>values we have string.xml file. Our string.xml file should be look like
Editing activity_main.xml
Under res>layout we have activity_main.xml file.
Our activity_main.xml file should look like
Editing MainActivity.java
Under java>com.example.sagorsarker.interstitialdemo we have MainActivity.java class
After editing our MainActivity.java will looks like as below
No comments:
Post a Comment