Description  

Hello, friends in this blog I have shown How you can Integrate the Unity ads on your own apps and earn money from your apps, now AdMob showing a problem is the Ad limit, as a result, you are unable to monetize your apps if you have huge numbers of users on your app but you unable to earn more than a dollar its significantly affect your earnings so the alternative and best ad network is Unity Ads, It provides you A decent amount of earnings as compared to other Ad networks so you use it now and monetize your pro apps 

 Follow the steps to integrate the Unity ads on your android app, Here I'm using Google's official Android Development software i.e. Android Studio 

 DEMO APK FILE DOWNLOAD HERE

) STEPS 


-> STEP 1 (add this Unity lib on Gradle Build) 


implementation 'com.unity3d.ads:unity-ads:4.3.0'


-> STEP 2 ( Paste it on initialization )


       String placementId = "Interstitial_Android";

private String unityGameID = "your_id"; // add Game id here 

private boolean testMode = true; // set to false before publish


-> STEP 3

// CREATE YOUR UNITY ACCOUNT for game id

https://dashboard.unity3d.com/login


-> STEP 4 ( Paste it ON  " onCreate " )


UnityAds.initialize(getApplicationContext(), unityGameID,  

testMode,  myAdsListener);


-> STEP 5 ( Paste it on myAdsListener -> initializeComplete)


UnityAds.load(placementId ,loadListener);


-> STEP 6 (On Button Click)


UnityAds.show(getApplicationContext(),  placementId

    ,showListener);


-> STEP 7 

// Paste it on Android Mainfest.xml 



<activity
        android:name="com.unity3d.services.ads.adunit.AdUnitActivity"
        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
        android:hardwareAccelerated="true" />
    <activity
        android:name="com.unity3d.services.ads.adunit.AdUnitTransparentActivity"
        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
        android:hardwareAccelerated="true" />
    <activity
        android:name="com.unity3d.services.ads.adunit.AdUnitTransparentSoftwareActivity"
        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
        android:hardwareAccelerated="false" />
    <activity
        android:name="com.unity3d.services.ads.adunit.AdUnitSoftwareActivity"
        android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
        android:hardwareAccelerated="false"/>

-> STEP 8 

// Paste it on Android Mainfest.xml 

// ADD THIS PERMISIION  


  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission    android:name="com.google.android.gms.permission.AD_ID"/>
    
-> STEP 9 

// ADD THIS TO ACTIVITY on Android Mainfest.xml 
 
android:hardwareAccelerated="true"

_____________


Java File of Unity ads 




Video Tutorial :