通过状态栏禁止开放设置菜单 [英] Disable open setting menu via status bar
问题描述
我正在为平板电脑Android应用程序。用户不应该能够做别的用平板电脑。应用运行的启动器。
I'm making android app for the tablet. The user should not be able to do anything else with the tablet. App run as Launcher.
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
我想停用通过状态栏面板设置:
I trying to disable settings via status bar panel:
<intent-filter >
<action android:name="android.settings.SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter >
<action android:name="android.settings.WIRELESS_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
设置菜单无法通过状态栏打开,但用户可以通过WiFi设置进入设置菜单上的状态栏,并运行其他应用程序或杀死/卸载我的应用程序。
Settings menu can not be open via status bar, but user can go to settings menu via wifi settings on status bar and run another applications or kill/uninstall my app.
有没有一种方法(通过使用密码保护它例如),或通过我的应用程序或隐藏状态栏来覆盖它,并禁止将它扩大到禁止设置菜单?
Is there a way to disable the settings menu (e.g. by protecting it with a password) or to override it by my application or hide status bar and disabling to expand it?
推荐答案
如果问题是,用户可以通过WiFi设置设置,您可以添加:
If the issue is that the user can go to Settings via WiFi Settings, you could add:
<intent-filter>
<action android:name="android.settings.WIFI_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
这篇关于通过状态栏禁止开放设置菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!