Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blocking a pull-down menu in Android

Tags:

android

We have an industrial app running on stock Samsung Android devices. Because it's an industrial app we are trying to have it "take over" the device. We've got this pretty well working by setting in the manifest

      <category android:name="android.intent.category.HOME" />
      <category android:name="android.intent.category.DEFAULT" />

and by intercepting the Android "back" key via onBackPressed and doing nothing.

Our one remaining conundrum is that Samsung's UI layer, 'Touch Wiz', has a pull-down menu that the user can pull down over the top of our app and access other features from. We're trying to disable that.

Is there anything we can intercept that the way we did the the back button to block that? Any other way to block it?

(if someone suggests "rooting" the device, what could I do as root that would help here?)

Thanks in advance!!

like image 941
user316117 Avatar asked Dec 01 '25 06:12

user316117


1 Answers

Which stock samsung device are you working with?

and by pull down menu are you speaking of the Notification Bar?

Notification Bar

If so this is not a UI feature that is specific to TouchWiz, they may have modified what all can be accessed from the expanded notification bar. But this element exists in stock android as well.

If this is what you are referring to you can set a full_screen flag on your activity or application elements in your manifest. This will hide the notification bar while inside your application.

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
like image 82
FoamyGuy Avatar answered Dec 03 '25 21:12

FoamyGuy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!