Archive

Archive for March, 2012

Expand the status notification bar

March 20, 2012 1 comment

This is a really nice trick.

If you’ve ever tried some Launcher like: ADW Launcher, Go Launcher EX….you may pay attention that when you fling down on Home screen, it will scroll down the status notification bar.

Here what it  looks like..in my phone while scrolling down if you can’t imagine what I’m talking about.

Expand Status Bar

Expand Status Bar

About the implementation:

Object service  = getSystemService("statusbar");
Class<?> statusbarManager = Class.forName("android.app.StatusBarManager");
Method expand = statusbarManager.getMethod("expand");
expand.invoke(service);

Also you need to add a required permission, that is: "android.permission.EXPAND_STATUS_BAR"

Happy coding!

Cheers,

Pete Houston

Advertisements