I am making a home application and I think that it will be suitable if I use a fullscreen and not show the status bar. So now I want to be able to open or expand the status bar with a button on the menu, similar to the way some default home applications have in the menu. I know its possible since the default home does it. Is this done through an intent? If so can I have the code for it. If not well then I would appreciate it if you guys showed me how. Thanks!
See if this helps and let me know...
try{
Object service = getSystemService("statusbar");
Class<?> statusbarManager = Class.forName("android.app.StatusBarManager");
Method expand = statusbarManager.getMethod("expand");
expand.invoke(service);
}
catch(Exception ex){
....
}
uses permission : "android.permission.EXPAND_STATUS_BAR";
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