0

On unlocking the android lock screen, I want to launch my app asking the user for some inputs and after successful authentication allow the user to use the tablet.

I am currently able to launch my app when the user unlocks the tablet using the Broadcast receiver and then show the app in full screen.

Please let me know how to disable the System bar only for this app, so that the user will be able to access the tablet after successful authentication. The app has root access on the device.

PEHLAJ
  • 9,980
  • 9
  • 41
  • 53
Santhosh S
  • 1,141
  • 6
  • 21
  • 43

1 Answers1

0

If your device is rooted this code will help you to hide system bar on ICS:

ArrayList<String> list = new ArrayList<String>();
Map<String, String> env = System.getenv();
for (String envName : env.keySet()) {
    list.add(envName + "=" + env.get(envName));
}

// Array containing the environment to start the new process in
String[] envp = (String[]) list.toArray(new String[0]);

String hidingCommand = "while [ true ]\n" + "do\n" + "killall com.android.systemui\n" + "done\n";
Runtime.getRuntime().exec(new String[] { "su", "-c", command }, envp);

myContext.sendBroadcast(new Intent("com.mycompany.myapp.ACTION_BARHIDDEN"));

Check the answer provided by velazcod in Is there a way to hide the system bar in Android 3.0? It's an internal device and I'm managing navigation

Community
  • 1
  • 1
Chintan Soni
  • 24,761
  • 25
  • 106
  • 174