My app has 11 tabs on it. I set an image on the tab as the user progresses through the app. The problem I am seeing is when the tablet is shutdown, it doesn't appear to reset the app. It continues where it left off. The tabs still have their images on them and textboxes are filled in. I'd like it to start the app fresh when turned the tablet is restarted, wiping any previous entries.
This is my Activity_Pause procedure.
This is my Activity_Pause procedure.
B4X:
Sub Activity_Pause (Finishing As Boolean)
Try
If kiosk Then StartServiceAt(KioskService, DateTime.Now + 1 * DateTime.TicksPerSecond, False)
If Finishing Then
StateManager.ResetState("Main")
Else
StateManager.SaveState(Activity, "Main")
End If
StateManager.SaveSettings
Catch
Ex = LastException
cErrorLog.InsertLog(3,"CustomerTablet.Main.Activity_Pause",Ex.Message)
If DebugMode Then
Log(Ex.StackTraceElement(0))
End If
End Try
End Sub