Hello
Can anyone help me with using StartLockTask() to pin app to screen?
My approach is as follows, but it does not have any effect on pinning the app:
(I does not know if it makes sense, but I use CallSubDelayed because the android documentation states that "..this method can only be called when the activity is foreground. That is, between onResume() and onPause()." )
Can anyone help me with using StartLockTask() to pin app to screen?
My approach is as follows, but it does not have any effect on pinning the app:
B4X:
Sub Activity_Resume
CallSubDelayed(Me,"KioskMode")
End Sub
Sub KioskMode()
Dim jo As JavaObject
jo.InitializeNewInstance("android.app.Activity",Null)
jo.RunMethod("startLockTask",Null)
End Sub
(I does not know if it makes sense, but I use CallSubDelayed because the android documentation states that "..this method can only be called when the activity is foreground. That is, between onResume() and onPause()." )