AdMob blocking UIThread may cause ANR-Message

Put your problem here if it does not fit any of the other categories.

AdMob blocking UIThread may cause ANR-Message

Postby jenetic.bytemare » Fri Feb 11, 2011 2:08 pm

Hello everybody.

I implemented the AdMob SDK to my application.

The problem I face is that when I create a new instance of AdView

Code: Select all
myAdView = new AdView( myActivity );

this operation has to be performed from the UIThread.

Code: Select all
myActivity.runOnUiThread( ... )

I noticed, that the constructor of will BLOCK the current thread till an internet connection is being made. If the emulator's or device's network connection is offline, it will BLOCK more than five seconds. If a user event ( pointer-operation, keypress etc. ) arrives in this time, my application will show up the ANR-Dialog "Sorry! Activity .. is not responding."

I did not find anything about this issue anywhere and I wonder why ..!

I informed the AdMob support team. If I get a solution I will post it here.

If anyone has the same problem or knows what to do here, please leave me a mesage.

Thanks a lot!


Posts: 3
Joined: Fri Sep 17, 2010 8:22 am


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 11 guests