I am developing a standalone application (kiosk mode) for a android 4.0.3 running tablet, my problem is that user can go to the setting using the notification area of system status bar and force stop my app and use the tablet.
I need a hint how the surelock app handles the situation, I downloaded their app on unrooted device , after starting the app and set as default home screen, when I press on notification or recent apps button, the windows pops and hide instantly so user cant interact with it, the same kind of functionality I need in my app.
I have tried System overlay using service, it hides everything behind it (fullscreen), but problem is how i allow only my activity and hide other(like surelock app does).
WindowManager.LayoutParams params = new WindowManager.LayoutParams(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
PixelFormat.OPAQUE);
params.gravity = Gravity.RIGHT | Gravity.TOP;
params.setTitle("Load Average");
WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);
wm.addView(view, params);