adview threads are still running even after the app exit

201 views
Skip to first unread message

dvp

unread,
Oct 17, 2011, 7:30:38 PM10/17/11
to Google AdMob Ads Developers
I did follow the steps mentioned in below discussion

https://groups.google.com/group/google-admob-ads-sdk/browse_thread/thread/fa2e420d710420dc

@Override
protected void onDestroy()
{
AdView av = (AdView)findViewById(R.id.adView);
if (av != null)
av.destroy();
av = null;
super.onDestroy();
}

@Override
protected void onPause() {
// TODO Auto-generated method stub
AdView av = (AdView)findViewById(R.id.adView);
if(av != null)
{
av.stopLoading();
}
super.onPause();
}

@Override
protected void onStop() {
// TODO Auto-generated method stub

AdView av = (AdView)findViewById(R.id.adView);
if(av != null)
{
av.stopLoading();
}
super.onStop();
}


When I checked the threads after app exit, threads are still running.

WebView core Thread

Webview Worker Thread

http0
http1
http2




I am using 4.1.1 Admob sdk.


Any suggestions how to fix this issue.

Thanks
Prasad




dvp

unread,
Oct 18, 2011, 10:12:30 PM10/18/11
to Google AdMob Ads Developers
I am still waiting for an answer, can anybody respond from admob
support?

On Oct 17, 7:30 pm, dvp <prasad.duggin...@gmail.com> wrote:
> I did follow the steps mentioned in below discussion
>
> https://groups.google.com/group/google-admob-ads-sdk/browse_thread/th...

Jim

unread,
Oct 18, 2011, 11:11:38 PM10/18/11
to Google AdMob Ads Developers
I can try...

Are the threads persisting? They might still run because the thread
has not been cleaned up (Android manages GC, so it will clean up
memory on its own schedule, and not necessarily when a thread is no
longer "running").

I've noticed that they might persist while waiting for an HTTP
response, so the thread doesn't crash, and so it runs for a little
while longer. Sometimes the emulator marks it with an asterisk to
indicate it is ready for GC.

Does that help?

-Jim

dvp

unread,
Oct 21, 2011, 10:51:03 AM10/21/11
to Google AdMob Ads Developers
Thanks Jim, I donot see the stars on ddms for adview thread after app
exit, I am seeing another issue due to this prob, after playing video
with you-tube embed player, it stops launching the ad's even though my
threads are not running after the you-tube player exit. , it is
reporting the network error or add the test device in ddms log,

1 11469 native 325 54 main
*2 11470 vmwait 10 0 HeapWorker
*3 11471 vmwait 11 0 GC
*4 11472 vmwait 0 0 Signal Catcher
*5 11473 running 4 19 JDWP
*6 11474 vmwait 29 16 Compiler
7 11475 native 0 0 Binder Thread #1
8 11476 native 0 0 Binder Thread #2
9 11478 native 1452 218 WebViewCoreThread
10 11480 native 0 0 CookieSyncManager
12 11482 wait 0 4 http0
13 11483 wait 1 1 http1
14 11484 wait 10 16 http2
15 11485 wait 9 15 http3
16 11486 native 20 9 WebViewWorkerThread
18 11521 native 0 0 Binder Thread #3
Reply all
Reply to author
Forward
0 new messages