Determine notification bar height from a service

by Vitaliy » Sat, 19 Jun 2010 03:12:35 GMT

Sponsored Links

The application I'm working on is a service which runs in the
The problem is that I need to determine the height of the notification
bar for some functionality of the service.

I found a number of solutions for this, for regular activities - a
view inside an activity can determine its own height without the
notification bar, based on for example checking its actual view size
from its onSizeChanged event, after it is already drawn. However, this
is not applicable to a service which has no physical view drawn,
nor directly related applications.

I would really appreciate any ideas on getting the size of the
notification bar!
Perhaps at a system level API?

Thanks so much!



Other Threads

1. E/dalvikvm : ERROR: Byte swap + verify failed

     I'm trying to port glibc to linux kernel v2.6.31. I am using a TI
OMAP 3503 processor.

I'm getting this error with linux-omap3-2.6.31:

E/dalvikvm(  676): ERROR: Byte swap + verify failed

Here is the full error message:

D/AndroidRuntime(  659):
D/AndroidRuntime(  659): >>>>>>>>>>>>>> AndroidRuntime START
D/AndroidRuntime(  659): CheckJNI is ON
I/        (  660): ServiceManager: 0xac38
W/AudioHardwareInterface(  660): Using stubbed audio hardware. No
sound will be produced.
I/AudioFlinger(  660): AudioFlinger's thread ready to run for output 0
I/CameraService(  660): CameraService started: pid=660
D/dalvikvm(  659): DexOpt: --- BEGIN 'core.jar' (bootstrap=1) ---
E/dalvikvm(  670): ERROR: Bad length: expected 818624000, got 3590960
E/dalvikvm(  670): ERROR: Byte swap + verify failed
E/dalvikvm(  670): Optimization failed
W/dalvikvm(  659): DexOpt: --- END 'core.jar' --- status=0xff00,
process failed
E/dalvikvm(  659): Unable to extract+optimize DEX from '/system/
D/dalvikvm(  659): Failed on '/system/framework/core.jar' (boot=1)
D/dalvikvm(  659): VM cleaning up
D/dalvikvm(  659): LinearAlloc 0x0 used 4100 of 4194304 (0%)
W/dalvikvm(  659): JNI_CreateJavaVM failed
E/AndroidRuntime(  659): JNI_CreateJavaVM failed
D/AndroidRuntime(  672):

Could someone help me figure out the root cause of this error, and a
possible resolution, please?

Best regards,


2. How to modify HTTP PROXY by using Android API?

Hello all,

I found a statement in SDK document about HTTP PROXY.
It seems that there is no way to modify HTTP PROXY directly by using
API since this becomes read only in Settings.Secure.HTTP_PROXY .

Is there any other way to change this settings? either via UI or
function call.

Any help would be highly appreciated.

Best regards,

3. Programmatically Adding a LinearLayout Error

4. Changing standin animation in camera preview

5. savedInstanceState Textview text problem.

6. Custom GridView

7. How can i catch the notification from in built mail in mobile?