Cannot close interstitial ad on InMobi Android SDK - android

I am using InMobi 5.2.1 android SDK for interstitial ads...
The ads are loading fine... However when the user clicks on the ad (to open the web browser), and goes back quickly, sometimes the ads are left open with no way to close it.
Clicking on the X does not seem to work, nor the back button..
When clicking on the back button I get the following error log:
Unimplemented WebView method onKeyDown called from: android.webkit.WebView.onKeyDown(WebView.java:2310)
I've tested this on 2 lollipop devices with the same issue.
Any clues?

Related

how to stop unity ads sdk creating ads in background

Unity Android ads SDK has a severe problem: it will create an interstitial ad in the background while the user switches the app between foreground and background very quickly.
When the app's "onResume" is called, I will call Unity to show an interstitial ad. But if the app goes to the background before the ads showed, Unity SDK will also pop the ad. This's bad. How can I stop this?
Thanks!

Android studio Interstitial Ad always displayed

I'm using admob with android studio.
I made a simple test use:
From my mainactivity.java i launch an interstitial ad before going through to the mainactivity2.java.
When the Interstitial ad is dismissed, i close the mainactivity.java with a finish();
Request.
When i press the back button on my phone the Interstitial ad is showing again.
Can someone explain me why ? I mean the first activity is supposed to be closed, so this mean the ad create his own activity ?
Thanks for help.

Clicking on an ad opens a browser, but I cannot go back to the launching activity screen of my Android app

Even though there is a similar case here:
After click AdMob ads, I cannot return to my Android app by back button
the code proposed didn't solve my case. So I am posting this if there's somebody with fresh ideas to solve this.
I have coded an app for Android. Now I am trying to add ads to this app.
I am implementing the ads from Appodeal. When I show an ad type called MREC (which is a square-like banner) on my main activity, if I click
on the ad, it will open a tab in the default browser of the device.
The problem arises when I press the square button on the device (the menu that displays the current running apps): it displays the browser and
also my own app as active. If I select my app, Android wont let my app come to the forefront, instead it shows the device background or the
recently opened browser. It's like the browser has taken over the "identity" of my app.
So, why I cannot return to the activity screen where the ad is located, and from where the click launched a browser tab?
One more thing is that in the sample apps that Appodeal provide, there is no code in onResume, and there isn't any different code from the
Appodeal SDK in the manifest, and yet, the app returns correctly to the main activity after coming from the browser tab. I am also trying to implement Admob ads, and the same effect happens as described in this post.
Solved! I implemented the advice by the User: AngraX from this page:
How can I do that in Android. Activity -> WebBrowser -> Acrivity, but Press Back not see the WebBrowser
where he recommends to add this to the Main Activity declaration in the Manifest file of your App:
android:allowTaskReparenting="true"
android:launchMode="singleTask"
And it works! After the Smaato ad in my App launches a tab in the default web browser of the device, I am now able to return to my Main Activity, no matter if the returning is done in any of these 3 ways:
By pressing back button the necessary number of times to return to the Main Activity screen, no matter if you press back button from your App or from the browser
By clicking the close (X) button on the screen of your App
By pressing the square button of your Android device (Menu Button), and then choosing your App

Activity restarts after showing the Ad from Admob

I have an app which has an activity-A. I am showing an Interestial Ad from Admob in it. This is achieved using the Google play services. When there is a weak signal, when I clicked the home button in middle of the app, I could see the home screen. Now when I again clicked the app, the app freshly starts (instead of continuing from the place where i left) and when I close the app using the close button which actually calls the finish() statement and closes the app. But after closing the app the app continuous the activity from the first place where i have pressed the home button which Is very strange to me. Kindly help me to resolve this
This is not happening when I have full internet signal / no signal.

Admob ads displaying but click through doesn't work

I'm using the GoogleMobileAdsSdkAndroid.zip (Version 6.4.1), with android-13 specified as the target in project.properties in Eclipse.
When I was developing and testing the app, I was using adMob in test mode. The ads loaded, displayed and refreshed ok. However, when I clicked on an ad, it didn't click through. A window opens very very briefly but immediately closes and my app resumes again (it looks like the onResume method is called from a brief inspection).
I thought that this was just due to it being in test mode, so I pushed my app out to Google Play anyway with testing turned off.
However, testing it on a friend's phone, it does exactly the same thing.
Any ideas gratefully received?
Thanks.
Cracked it! The AdMob Activity and the main activity for my app have to run in the same process. I had specified a particular process in the main activity for my app in the AndroidManifest.xml, but hadn't specified the same process in the AdMob activity. As soon as I did that, all is working.
.
I deleted the following code from onUnifiedNativeAdLoaded method and problem solved!
if (unifiedNativeAd!= null) {
unifiedNativeAd.destroy();
}

Categories

Resources