adview

Java nullpointer exception from Webview in android.webkit.WebViewClassic.loadDataWithBaseURL

纵饮孤独 提交于 2019-12-22 08:00:01
问题 Following the suggestions provided in this question I modified my AdMob code to be compliant with the recommendations, that effectively worked reducing the number of exceptions that were appearing. However a new exception is rising. The code is the following: @Override protected void onDestroy() { if ( adView != null ) { adView.destroy(); adView = null; Log.i(ApplicationData.APP_TAG, TAG + ": OnDestroy, destroying the Adview"); } super.onDestroy(); } The method adView.destroy() appears to

Android AdMob not showing LinearLayout on Bottom

雨燕双飞 提交于 2019-12-18 05:07:08
问题 Okay really weird situation with AdMob. I want to place the ad on the bottom I have a LinearLayout. When I do it never shows up. When I place it on top it shows up perfectly. Not sure what the deal is here is my code. I do get a warning in LogCat that says "Not enough space to show ad! Wants <480,75> Has: <480, 0>" LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/res/mypackage" android:id="@+id/mainmenulayout" android

Make adview stick in place when sliding menu

感情迁移 提交于 2019-12-13 06:21:56
问题 I have integrated admob ads in my android application. I'm using jfeinstein's sliding menu, so when I slide it, adview slides with it too. How can I make it stick on the screen, no matter of sliding menu state? Some code: <com.google.ads.AdView xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:id="@+id/adview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" ads:adSize="BANNER" ads:adUnitId="ID" ads

NativeExpressAdView - Failed to load ad: 0

ぐ巨炮叔叔 提交于 2019-12-12 18:19:47
问题 I use NativeExpressAdView but I can't get ad within this warning: 06-15 09:47:32.557 13810-14512/com.bangdev.wifichua W/Ads: There was a problem getting an ad response. ErrorCode: 0 06-15 09:47:32.557 13810-13810/com.bangdev.wifichua W/Ads: Failed to load ad: 0 This is my ad layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:ads="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android

Make AdView have a fixed size upon start of an activity

我是研究僧i 提交于 2019-12-11 16:21:49
问题 Is there a way of forcing AdView to take it's initial size immediately upon activity start and stay at that fixed size. As it is now, it changes upon loading of the ads, meaning my renderers onsurfaceChanged function will be called twice upon starting the activity, which causes some initialization to be run twize. I can work around this, but it would be very very much easier if there was a simple way to assign a fixed size to the banner on inflation. I would prefer not to hardcode dip values

NullPointerException with proguard

被刻印的时光 ゝ 提交于 2019-12-11 15:38:09
问题 I'm using Proguard with my apps and I'm getting NullPointerExceptions sent to my Developer Console for random users. When I do a ReTrace, it seems to be an issue with the AdView I'm using. The confusing thing is, the error is happening in my Service which, obviously, doesn't use ads. Not sure if Proguard is doing something to the code or what. This is the de-obfuscated stack trace: java.lang.NullPointerException at com.google.ads.internal.AdWebView$1.a(Unknown Source) at com.app.base

Adview loadAd() triggering a StrictMode violation

二次信任 提交于 2019-12-10 17:32:50
问题 I am trying to add some adds in my application. When I have StrictMode enabled, I get a bunch of policy violations like this one (maybe 6 or 7 of these). Is this normal? 18817-18817/com.xyz.xyz.xyz D/StrictMode: StrictMode policy violation; ~duration=67937 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=5439503 violation=2 at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1263) at libcore.io.BlockGuardOs.fstat(BlockGuardOs.java:132) at java.io

Admob Security Exception : Permission Denial

一世执手 提交于 2019-12-10 13:15:07
问题 I tap on my AdView and open alibaba app page in play store and then installed it. After that, I started to get this error and my app crashed whenever I tap on the AdView. After uninstalling this alibaba app, I was able to tap and view the ads. Now I'm curious why this happened? Caused by java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW dat=https://www.googleadservices.com/... flg=0x10000000 cmp=com.alibaba.intl.android.apps.poseidon/com.alibaba

Error inflating class com.google.ads.AdView (InflateException)

泄露秘密 提交于 2019-12-10 11:43:10
问题 I am trying to show a adview in my android application, but it shows an InflateException. This terminates the app and I cannot do anything. Here is my logcat - 05-06 14:09:09.428: E/AndroidRuntime(928): FATAL EXCEPTION: main 05-06 14:09:09.428: E/AndroidRuntime(928): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.kodspider.parkon/com.kodspider.parkon.HomeActivity}: android.view.InflateException: Binary XML file line #18: Error inflating class com.google.ads.AdView 05

WebViewCoreThread used by admob AdView is using high CPU even when parent Activity is paused [duplicate]

牧云@^-^@ 提交于 2019-12-09 14:21:52
问题 This question already has answers here : Android, AdMob: AdMob ad refresh destroys frame rate (2 answers) Closed 3 years ago . I'm using Google Admob SDK v6.1.0 (https://developers.google.com/mobile-ads-sdk/download), and I instantiate the com.google.ads.AdView programmatically (not in XML), and add it into a LinearLayout, dynamically in my Activity. One of my users reported that when they click the Home button while in my Activity (in order to background it), they start seeing high CPU usage