The application I'm working on is a service which runs in the background in android. 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 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.
I would really appreciate any ideas on getting the size of the notification bar at a system level, perhaps?
Thanks so much!
Vitaliy
Have an activity tell your service the proper size to use. The status bar height, nor the screen size, is likely to change during the operation of your service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With