Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable status bar / notification bar on android programmatically?

i create a lockscreen application.. this application is triggered by SMS.. when a SMS containing command was received, it will display a lock screen activity.

my lockscreen activity is using TYPE_KEYGUARD for disabling a home screen button. When device screen turn off and then i turn it on again, my problem is status bar / notification bar still appear on my screen. this is a problem because the user still can access some program through status bar / notification bar even the device is being locked. so i want to dissapear this status bar / notification bar so that the user (theft) can't access that device anymore.. Please help me to solve this..

like image 942
Michael Avatar asked Sep 28 '11 05:09

Michael


People also ask

How do I disable the Android bar?

On the SureLock Admin Settings screen, tap SureLock Settings. On the SureLock Settings screen, you will find Disable Bottom Bar. Tap Disable Bottom Bar which will disable all the shortcuts in the bottom bar of the device.


1 Answers

I think what you're trying to do is programmatically set an activity as fullscreen. If so, consider the following:

requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                     WindowManager.LayoutParams.FLAG_FULLSCREEN);

Source: http://www.androidsnippets.com/how-to-make-an-activity-fullscreen

like image 171
shanet Avatar answered Oct 01 '22 20:10

shanet