Hi everyone, I'm in the finishing phase of my project now, where I'm testing the overall functionalities (including the real scenario for the kiosk mode)... but I just encountered a big big big problem I do not know how to solve.
The project is partially described in
this post.
AT THE MOMENT:
There is a Watchdog APP (
A) that periodically sends an Intent to starts the Main APP (
B) (in this way if it crashes can be resumed automatically) as
@Erel suggested in
this post, where, it is said that launching an already-visible app will have no effects.
With this snippet (is it correct for the kiosk mode?)
Sub Timer_Tick
Dim In As Intent
Dim pm As PackageManager
In = pm.GetApplicationIntent("abc.def")
If In.IsInitialized Then
StartActivity(In)
End If
End Sub
This work
correctly ONLY when the device is
not in Kiosk Mode.
IN KIOSK MODE:
Every time that
A sends an intent to start
B, even if it is already in the foreground everything glitches because these events are fired
WDT Service //<--- Intent that starts Main App (B) has arrived
** Activity (main) Pause event (activity is not paused). **
*** home: B4XPage_Disappear [home]
*** mainpage: B4XPage_Background [home]
RFID.StopServiceScheduler
** Activity (main) Resume **
*** mainpage: B4XPage_Foreground [home]
*** home: B4XPage_Appear [home]
^^^ This does not happen if Kiosk Mode is disabled ^^^
I hope someone can help me because this was an extremely unexpected behavior.
Thanks in advance