I am experiencing a very nasty error trying to implement Admob in my expression. I thought the problem was in my code, but after some investigation, I found this also in the Android-Banner-Essentials example (available for download here ). Interestingly, has anyone ever encountered this problem or maybe knew how to deal with it.
Basically, when an application has a status and a title bar, this should use the whole screen. The Banner Essentials example does not display anything except the Admob icon on the very top of the area. I downloaded this example, changed only two things:
- added my publisher ID to compile and receive any ads correctly;)
- added one parameter to the activity manifest to disable the title and status bar: Android: theme = "@ android: style /Theme.NoTitleBar.Fullscreen"
The compiled binary, regardless of which device it is running on (for tested Nexus One, G1, Desire, different versions of Android), the same problem is affected:
- When the ad banner is displayed, click "Home",
- After returning to the main screen, press and hold the Home button to see recently launched applications,
- Select the Banner Essentials app again.
My tests show that with a 50% probability of playing the Admob banner, do not return to your position - the very top of the screen. To better show what I mean, I prepared three screenshots:
http://img841.imageshack.us/g/correctz.png/
Important messages:
- When the application resumes normally, the banner displays just below the status bar and slides until they are aligned with the top border of the screen,
- When an error occurs, the banner does not move at all,
- I could not reproduce the problem with any other interruption (pressing Back, Power button)
- I think this may be due to gain / loss of focus (see screenshots).
My application is a bit more complicated than Banner Essentials, so I started by finding a problem in my code without any luck, so I tried to simplify the situation as much as possible and here are the results.
Does anyone know what might cause the problem? Maybe some additional flags or properties need to be configured to handle this behavior?
groob source share