Banner ads are small sized ads which are shown in bottom of activities mostly . in this tutorial you will learn how to apply banner ads in Android app and how to earn money from facebook audience network , If you have any question you can ask in comments.
First insert below code in build.gradle (Module)
implementation 'com.facebook.android:audience-network-sdk:5.11.0'
Then use below code in layout file
<LinearLayout
android:id="@+id/banner_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
/>Then Use below code in java directory after"public class MainActivity extends AppCompatActivity {"private AdView adView;Then after setContentView(R.layout.activity_main); this line , insert below codeadView = new AdView(this, "IMG_16_9_APP_INSTALL#YOUR_PLACEMENT_ID",AdSize.BANNER_HEIGHT_50);
LinearLayout adContainer = (LinearLayout) findViewById(R.id.banner_container);
adContainer.addView(adView);
adView.loadAd();All Done Banner ad will loadIf you want to earn more with your already published app you can contact me on facebook ,i will help you to earn more with secret tricks ( Paid Work )If you face some problem you can contact on Facebook page on comment on youtube videohttps://www.facebook.com/Android-App-development-1790181861260693
Youtube Tutorial Video Link
https://youtu.be/JIphfJUxqgM
Search terms
how to integrate facebook ads in android apps 2021
facebook banner ads example
facebook ad integrate android
facebook ads integration in android studio
facebook audience network android tutorial
how to implement facebook native ads in android
facebook native banner ads android example
facebook audience network ads integration
facebook interstitial ads android example
facebook interstitial ads android github
0 Comments