See KioskService code. You will need to change Main with the second activity. Though it might be simpler to use a single activity and change layouts in this case.
Anyway, back to the present where we have no such API...The L Developer Preview introduces a new task locking API that lets you temporarily restrict users from leaving your app or being interrupted by notifications. This could be used, for example, if you are developing an education app to support high stakes assessment requirements on Android. Once your app activates this mode, users will not be able to see notifications, access other apps, or return to the Home screen, until your app exits the mode.
To prevent unauthorized usage, only authorized apps can activate task locking. Furthermore, task locking authorization must be granted by a specially-configured device owner app, through the android.app.admin.DevicePolicyManager.setLockTaskComponents() method.
Its an excellent work!2) because I was not able to delete recent task list I worked with
a couple of start activities Start0-Start7
That works very well for me no problems with accidentally activating the
original launcher and a long delay
at this section of code:B4A version: 5.20
Parsing code. Error
Error parsing program.
Error description: Unknown type: controls
Are you missing a library reference?
Occurred on line: 39 (Main)
Dim ICS As Controls
Dim ICS As Controls ICS.Initialize(Activity, Me)
It is this example: KioskAppExtended_vc2What is KioskAppExtended? Which error do you see in the logs?
Select Case Main.LastActivity.tolowercase.trim Case "vr" If IsPaused(Main) Then KioskTimer.Interval = 1000 Case "licensecheck" If IsPaused(LicenseCheck) Then KioskTimer.Interval = 1000 Case "checkupdates" If IsPaused(CheckUpdates) Then KioskTimer.Interval = 1000
Sub Activity_Pause (UserClosed As Boolean) StartActivity(Me) End Sub
Sub Service_Create myWatchdogTimer.Initialize("CheckMainForeground", 300) myWatchdogTimer.Enabled = True End Sub Sub CheckMainForeground_Tick If IsPaused(Main) Then StartActivity(Main) End Sub
Hi Erel,What is KioskAppExtended?