Question

I'm developing a kiosk application (installed on a rooted Android device) and would like to remove the access to the settings. I think this can be done by just removing the "settings.apk", am I right? If not please correct me.

The question is, what would be the side effects of removing the Settings.apk? Are there any that I should be aware off?

Was it helpful?

Solution 2

Well yes,if you remove the Settings.apk, you're breaking alot of stuff. Say, functionality in terms of new wifi connections, blue tooth pairing, sound adjusting. Also you'd be breaking references to it, like when a user would try to launch settings from the status bar drop down or the launcher, it would result in the corresponding application to crash, whether it be system or user. But why delete the apk? Ty looking for alternatives, which would simple restrict the users from accessing it. Hope I helped out.

OTHER TIPS

I think that is a bad idea. I think you need to create an application that can run over the lock screen. In you main FragmentActivity you must add the next windows flags:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_layout);

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

}

If your device has home physical button, so you need add to your AndroidManifest flags for launcher application:

<activity
    android:name="YourFragmentActivity"
    android:label="@string/app_name"
    android:theme="@style/MyTheme" >
    <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.MONKEY" />
    </intent-filter>
</activity>

You must add a locking method to your device (pin, pattern, etc). Then start your application, press lock button (screen will be off), press lock button newly. And your app will be over the lockscreen. (and no one can enter to settings)

To avoid the exit:

@Override
public void onBackPressed() {
    if (firstfragment.isVisible()) { //first fragment loaded in your backstack

    } else {
        super.onBackPressed();
    }
}

UPDATE

Here a video showing how work this:

http://www.youtube.com/watch?v=ZtNAAVy_nWY

PD: Sorry my english is bad.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top