I want the kids only can use the (B4Xpage) app I started, not using the home button and select other apps. I see that it is not possible to hide the softkeys.
The older kiosk-solution seems not to work because of Services starting apps are not allowed in newer Androids.
The newer kiosk-solution is not good for my needs, because I just want a "kiosk-mode" in that moment, I give the app to the kids.
For now my "solution" is hiding the softkeys with a tape But would be glad to have some more flexible ways.
Sub Activity_Resume
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim activityManager As JavaObject = ctxt.RunMethod("getSystemService", Array("activity"))
Dim LOCK_TASK_MODE_PINNED As Int = 2
If activityManager.RunMethod("getLockTaskModeState", Null) <> LOCK_TASK_MODE_PINNED Then
Dim joActivity As JavaObject
joActivity.InitializeContext
joActivity.RunMethod("startLockTask",Null)
End If
End Sub
Sub Activity_Resume
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim activityManager As JavaObject = ctxt.RunMethod("getSystemService", Array("activity"))
Dim LOCK_TASK_MODE_PINNED As Int = 2
If activityManager.RunMethod("getLockTaskModeState", Null) <> LOCK_TASK_MODE_PINNED Then
Dim joActivity As JavaObject
joActivity.InitializeContext
joActivity.RunMethod("startLockTask",Null)
End If
End Sub