Android admob consuming more cpu

2020-04-14 13:23发布

问题:

Since I integrated the AdMob view on my app, the CPU usage of the app grose to 12% all the time. If i disable ads, then cpu usage become 0. Presently i integrated ads integrated through xml.

回答1:

It's most probably caused because Admob uses HTML - WebView to render Ads. Depending on device, it causes a looot of pain.

Try adding hardware acceleration on activity which displays the Ad.

<activity android:hardwareAccelerated="true" />

Or the whole App:

<application android:hardwareAccelerated="true" />

Or try some other configuration more specific:

http://developer.android.com/guide/topics/graphics/hardware-accel.html



标签: android admob