- Home /
Unity AdMob Crashes After VideoAd Load (Android)
Hi, I have built versions with ads just fine months ago till recently when I needed to make some changes. All of a sudden on Unity version (2019.2.8f1), my android builds keep crashing after a minute or so (assuming that's when I find an ad). I can't find any specific errors except for "HandleRewardBasedVideoFailedToLoad" method being run (Figure 2). Here are some pictures:
Here is part of the script for managing my reward video ads: public void Start() { // Initialize the Google Mobile Ads SDK. MobileAds.Initialize(appId);
// Get singleton reward based video ad reference.
this.rewardBasedVideo = RewardBasedVideoAd.Instance;
// RewardBasedVideoAd is a singleton, so handlers should only be registered once.
this.rewardBasedVideo.OnAdLoaded += this.HandleRewardBasedVideoLoaded;
this.rewardBasedVideo.OnAdFailedToLoad += this.HandleRewardBasedVideoFailedToLoad;
this.rewardBasedVideo.OnAdOpening += this.HandleRewardBasedVideoOpened;
this.rewardBasedVideo.OnAdStarted += this.HandleRewardBasedVideoStarted;
this.rewardBasedVideo.OnAdRewarded += this.HandleRewardBasedVideoRewarded;
this.rewardBasedVideo.OnAdClosed += this.HandleRewardBasedVideoClosed;
this.rewardBasedVideo.OnAdLeavingApplication += this.HandleRewardBasedVideoLeftApplication;
Debug.Log("AD REQUEST- 0x0");
this.RequestRewardBasedVideo();
Debug.Log("AD REQUESTED- 0x3");
}
public void Update()
{
Debug.Log("AD NOT LOADED - 0x1");
if ((rewardBasedVideo.IsLoaded()))
{
Debug.Log("AD LOADED - 0x2");
if (aniCount < 1)
notifactionAd.Play("AdPopUp", 0, 0);
}
}
Anyone have any idea? I've been having this problem for over a week now. Thanks!
Your answer
Follow this Question
Related Questions
android app crashes after unity screen (maybe because of AdMob?) 0 Answers
App crashes on google play login 1 Answer
(Closed)My Android game freezes after 7-12 minutes because of this code 3 Answers
Android thread causes crash? 1 Answer
Using Parse with Unity and the Parse Initialize Behavior is causing Android Device to crash 0 Answers