i am working on Application like surelock i have prevent the status bar to pull down in my application. i have list off all installed applications. Is it possible to prevent the status bar to pull down for all other applications also? Mean user open any application from my app and he should be unable to pull down the status bar even he is using another application
1 Answers
If I understand what you're asking correctly, it sounds like what you're trying to do would fall into a category of things that the SDK would not allow.. You can, however, HIDE the status bar.. But for you to write an App that (A) runs in the background, and (B) locks the user from utilizing their own system status bar, or pulling it down - would be considered malicious. It may (or may not) be possible with a ROOTED device, and your App being used as a THIRD-PARTY App - but (A) it wouldn't be allowed on the PlayStore, (B) user's would be very unhappy if you locked the status bar, (C) Nobody here on StackOverflow would help you to do this, even if it's possible, which (C) I highly doubt it's possible.
You could, however, HIDE the status bar, or run your App in full-screen mode, if needed.
But do you mind me asking why exactly you're trying to "lock" the status bar?
What is it that you're trying to achieve by doing this?

- 578
- 5
- 12
-
There are many application on playstore. Like.. suere lock, 42gears which have the functionality to prevent the status bar to pull down – Hassan ishaq Mar 06 '19 at 16:30
-
User will give permission to make it default launcher application and will activate as device administrator – Hassan ishaq Mar 06 '19 at 16:32
-
user have a option in application to enable or disable the status bar . if user select the disable then status bar should not be pull down even he is using any application – Hassan ishaq Mar 06 '19 at 16:36
-
@Hassanishaq I understand exactly - and yes some 'Launchers' (eg: Nova Launcher, Go Launcher, etc) may provide an option to _HIDE_ the StatusBar - but this is _NOT_ the same thing as "locking" the StatusBar so the User is unable to access it or pull it down. Accessing the StatusBar is a core system function - one that a developer cannot simply "lock" the User from being able to access.. Again, yes you can _HIDE_ the StatusBar, but you cannot _LOCK_ the StatusBar. However, it _might_ be possible on a ROOTED device, and the proper system privileges.. although I'm not positive about this. – Studio2bDesigns Mar 06 '19 at 19:20
-
@Hassanishaq I'm still curious what exactly you are trying to accomplish by doing this.. But the fact is that since such a function could be used in a malicious way, it's not allowed.. therefore, you are unable to achieve what you're trying to do. Again, the only way that it **might** be possible, would be to (A) Require the User's device to be ROOTED, (B) Obtain the proper system privileges, and (C) Offer your App somewhere outside of the PlayStore, since they would be highly unlikely to allow it. Anyhow, I've done my best to help, so please accept my Answer by clicking the checkmark. Thanks. – Studio2bDesigns Mar 06 '19 at 19:35
-
https://stackoverflow.com/questions/7457730/preventing-status-bar-expansion – Hassan ishaq Mar 07 '19 at 08:10
-
its preventing the status bar but only for my application but i need to prevent the status bar for all applications – Hassan ishaq Mar 07 '19 at 08:16
-
if u visit the **sure lock** its possible and this application is on playstore – Hassan ishaq Mar 07 '19 at 08:22
-
@Hassanishaq In any case, this isn't something I could assist you with - but I'm still trying to understand _why_ you would want to do this? Can you explain what "good" this would achieve, for the User? – Studio2bDesigns Mar 07 '19 at 11:23