I created a test app using Android Studio. How can I show ads in it? Do I need additional software?
Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
No need for an additional software. For showing ads on your app you need to have an admob account first. Make sure to provide legit informations or it may affect your payment in future. After that, you should create an ad unit for your app. You can have three types of ads : Banner, Interstitial And Reward Video Ads. Now, you need to add some codes to the following sections :
1) project-level build.gradle
2) app-level build.gradle
3) activity_main.xml
4) MainActivity.class
5) strings.xml
Make sure to provide your correct adunit id and app id in the codes especially under MainActivity.class and strings.xml sections. That’s it, you have placed a banner ad on your app. You can get the necessary codes from the below link :
https://www.javatpoint.com/android-banner-ads