HIDE & SHOW BOTTOM BAR.

Started by junetec, June 26, 2013, 01:01:33 am

Previous topic - Next topic

junetec

I try to adapt the A20 board to work in kiosk mode.

But don't find the way to hide and show the bottom bar in execution time.
In A13 with Android 4.0 it's enought to setup the app to work in fullscreen mode, but that don't work with A20 4.1

If I delete the file system/app/SistemUI.apk the bottom bar disappear, but if I copy again in his place it's imposible to show again with out restart the device.

Someone know how to do?

regards and thanks,

Enric

noid

oncreate:

try {
Runtime.getRuntime().exec(new String[]{
   "su","-c","touch /sdcard/hidebar-lock\n"+
   "while [ -f /sdcard/hidebar-lock ]\n"+
   "do\n"+
   "killall com.android.systemui\n"+
   "sleep 1\n"+
   "done\n"+
   "LD_LIBRARY_PATH=/vendor/lib:/system/lib am startservice -n com.android.systemui/.SystemUIService"});
} catch (IOException e1) {
   // TODO Auto-generated catch block
   e1.printStackTrace();
}
       


onpause:

java.io.File file = new java.io.File("/sdcard/" , "hidebar-lock");

if(file.exists()){
try {
       Runtime.getRuntime().exec(new String[]{
      "su","-c", "rm /sdcard/hidebar-lock\n"+
      "sleep 5\n"+
      "LD_LIBRARY_PATH=/vendor/lib:/system/lib am startservice -n com.android.systemui/.SystemUIService"});
     } catch (IOException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
     }
               
}