Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Override or disable settings menu

I'm making an application that should be used in a store that displays product information. I use an Android tablet to provide the customer with some interactive information. The user should not be able to do anything else with the tablet.

So far i managed to disable the back and home button. The application starts when the booting of the device has finished. He can therefore not start any other application when he restarts the device (I was not able to prevent the user from restarting the device).

The problem is, that the customer can open the settings menu and force kill my application.

Is there a way to either disable the settings menu (e.g. by protecting it with a password) or to override it by my application?

I do not plan to add my application to the Android market since it should only run in the stores.

like image 539
js- Avatar asked Nov 22 '11 10:11

js-


1 Answers

I found out how to override the settings menu.

Since the settings menu is opened via an implicit Intent I just need to add the right intent filters my activity:

<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>

This will let the user chose the settings application he wants to open. If I now set my activity as default, the user can not access the settings menu via the status bar.

like image 158
js- Avatar answered Sep 19 '22 09:09

js-