googleads-mobile-unity
googleads-mobile-unity copied to clipboard
Ads not initialising on Android
[REQUIRED] Step 1: Describe your environment
- Unity version: 2020.3.19f1
- Google Mobile Ads Unity plugin version: 6.1.1
- Platform: Android (iOS, Android, Unity Editor)
- Platform OS version: Android 10 (eg iOS 10, Android 9)
- Any specific devices issue occurs on: General
- Mediation ad networks used, and their versions: No mediation
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
Hello!
I've been implementing the AdMob ads via Google Mobile Ads Unity plugin in my Unity game. The project works in when running in the Unity Editor or when I build the project to iOS. When I try to run the Android build, which succeeds, the initialisation process of the game gets stuck while trying to initialise the Mobile Ads. The dependancies have been resolved successfully and the game gets no error. The only warning I could find that could be related to this is the following:
Warn GmsClient unable to connect to service: com.google.android.gms.leibniz.events.service.START on com.google.android.gms
The Initialise function also does not call the callback function. I am stumped because the iOS build is working without an issue without any problems. The following code is the initialisation function of the wrapper used to decouple the ad serving process. The first Debug.Log gets called while the second one inside the action does not. It also means that the RefeshAds function also does not get called.
Relevant Code:
public void InitializeAdController() { this.masterAdControllerInitialization = true; #if UNITY_IOS this.adsConfiguration = this.iosAdsConfiguration; #elif UNITY_ANDROID this.adsConfiguration = this.androidAdsConfiguration; #elif UNITY_EDITOR this.adsConfiguration = this.iosAdsConfiguration; #endif
Debug.Log("Starting Ads Initialization");
MobileAds.Initialize(initializationStatus =>
{
Debug.Log("Action Started");
Dictionary<string, AdapterStatus> adapterStatusMap = initializationStatus.getAdapterStatusMap();
bool initializationDone = true;
foreach (AdapterStatus adapterStatus in adapterStatusMap.Values)
{
if (adapterStatus.InitializationState == AdapterState.NotReady)
{
initializationDone = false;
break;
}
}
if (initializationDone)
{
RefreshAds();
}
});
}
Same here .. any luck solving ?
Any update?
i have a same problem. Can you fix this problem? if you can how?
I'm also having this issue
Closing this issue as obsolete and not replicated on the most recent version. If you still have issues, please reopen.