Status bar area not covered when activity is resumed

by groob » Wed, 11 May 2011 04:42:35 GMT


Sponsored Links
 Hello!

I'm experiencing very nasty bug trying to implement Admob in my
application.
I thought the problem is in my code, but after some investigation I
found it present also in Android-Banner-Essentials example (available
for download here: 
 http://code.google.com/mobile/ads/docs/android/fundamentals.html )
I wonder if anyone ever met this problem or maybe knows how to deal
with it.

Basically, when application has both status and title bar disabled, it
should use full screen.
Banner Essentials example displays nothing but Admob banner on the
very top of area available.
I downloaded the example, changed only two things:
- added my publisher ID to compile properly and receive any ads ;)
- added one param to activity's manifest to disable title and status
bar:
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

Compiled binary, no matter what device is it launched on (tried Nexus
One, G1, Desire, different Android versions), is affected with the
same issue:
- when ad banner is displayed press Home,
- once taken back to home screen press and hold Home to see recently
launched apps,
- select back Banner Essentials app.
My tests reveal that with 50% reproduction chance Admob banner doesn't
go back to its position -the very top of the screen.
To show better what I mean I prepared three screenshots:
 http://goo.gl/u9DTl 

Important notices:
- when app is resumed normally, banner is displayed just below status
bar, and slides up until is aligned to the top screen border,
- when error appears the banner doesn't move at all,
- I couldn't reproduce the issue with any other interrupt (pressing
Back, Power Button),
- I think it may be somehow connected to gaining/losing foucs (see
screenshots).

My app is bit more complex than Banner Essentials so I started with
searching the issue in my code, with no luck, thus tried to simplify
the situation as much as possible and here are the results.

Does anyone know what may be causing the problem? Maybe some
additional flags or properties has to be set to handle this behaviour?

Any advice will be appreciated.

Regards.

-- 



Other Threads

1. How to Route Audio to earpiece instead of speaker?

I am writing a voice application for HTC-G2 (MyTouch) phone. I am
using Audiotrack class (along with Audio Manager) to play audio in PCM
format. It works fine but audio comes out from speaker phone instead
of earpiece. When I use IsSpeakerPhoneOn() to query the status of
speaker, it comes out to be "off" (false).

I even tried SetSpeakerPhoneOn(true) and then SetSpeakerPhoneOn(false)
to make sure that I explicitly set the speaker to off but audio still
comes out of speaker. Interestingly, I checked IsSpeakerPhoneOn()
after setting SetSpeakerPhoneOn(true) and that API returned False.

I tried setRouting API to set ROUTE_EARPIECE but that API seems to be
deprecated.

Can someone please tell how to route audio to earpiece? I was under
the impression that earpiece shall be the default route for audio but
it does not look that way.

Thanks,
Puneet Goel
Kineto Wireless

--~--~---------~--~----~------------~-------~--~----~

2. Android device as a universal remote for CE/HA?

Frack, lemme try that again in PT...

Android hand-held ----Wifi---------- CE/HA server (Pluto/LMCE?) 
----------PoE (existing aircon network)...
                  |                  |                                 
                                             |--Wifi? (2.4ghz 802.11n)...
                   --Irda         |                                     
                                         |--IR?...
                         |           |_IR bridge__CE 
devices                                       |
                         
|                                                                               
           
|--Powerline?...
                         |_CE 
devices                                                                      
|
                                                                                
                                    
|_Proprietary RF:
                                                                                
                                    
Zigbee,Zwave,Insteon,X10 etc.
                                                                                
                                    
One or combination...

                                                                                
                                                       
HA end devices ===>

--~--~---------~--~----~------------~-------~--~----~

3. ADC2 Rating your own app

4. App To Turn Screen Upside Down While Phone Is Closed

5. Trouble passing a KML file to the DDMS Location Emulator

6. Launcher with parameters

7. Motorola Krave zn4 run on android?