PhoneGap的屏幕闪烁与AdMob的动画 [英] Phonegap screen flickers with AdMob animation
问题描述
一个用户报告说,应用程序的HTML视图闪烁的时候,AdMob的广告有一个动画。
A user reported that the html view of the app "flickers" when the admob ad has an animation.
下面是一个小的视频,他记录: http://www.youtube.com/watch?v = gQ7yxzpqfDA
Here's a small video he recorded: http://www.youtube.com/watch?v=gQ7yxzpqfDA
我看不到我的电话,但他的三星S3显示了这个问题。
I can't see that on my phone, but his Samsung S3 shows this problem.
任何想法,那是什么?或者我怎么可以禁用这种广告?
Any idea what can it be? or how I can disable this kind of ads?
谢谢! Javyer
Thanks! Javyer
推荐答案
我有一个类似的问题,我看到这里闪烁:
I was having a similar issue, see my flickering here:
https://www.youtube.com/watch?v=AfKbrw2qQmg
在什么情况下,我的触发,这是一个配置更改我在做(环境改变)在应用程序级别。
What triggered it in my case was a configuration change i was doing (a locale change) at the Application level.
Configuration config = getBaseContext().getResources().getConfiguration();
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
config.setLocale(mLocale);
} else{
config.locale = mLocale;
}
getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics()); // <--- THIS IS THE PROBLEM, WHY I DON'T KNOW
其中, mLocale
是一个为区域设置
对象与更改的设置。
Where mLocale
was a as Locale
Object with changed settings.
我想处理的配置改变自己在清单code,因为这可能是为应用程序/活动,神奇地重新启动本身(感谢Android的)原因:
I tried handling the configuration change myself in the manifest code as this might be a cause for the application/activity to magically relaunch itself (thanks Android):
...
<application
android:name="com.myapp.myapp"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@drawable/icon"
....
但是,没有任何影响。
But that has no effect.
所以,我的回答这个明显的问题是检查,如果你的程序是做一些改变配置和重新评估的。
So my response for this obscure problem is to check if your app is doing some changes to the configuration and re-evaluate that.
问题还记录与AdMob的支持,谁也得到了很好的尝试和帮助的https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/android/b1K4Ow59eWY
Issue also logged with adMob support who have been very good to try and help https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/android/b1K4Ow59eWY
这篇关于PhoneGap的屏幕闪烁与AdMob的动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!