Sub Service_Create
Private rp As RuntimePermissions
Main.PUB_InstDir= rp.GetSafeDirDefaultExternal("")
End Sub
Sub Service_Start (StartingIntent As Intent)
Service.StopAutomaticForeground 'Starter service can start in the foreground state in some edge cases.
Try
If File.Exists(Main.PUB_InstDir,"kvs.dat") = False Then
Main.kvs.Initialize(Main.PUB_InstDir,"kvs.dat")
Main.kvs.PutEncrypted("RecNo",0,Main.PASSWORD)
End If
Catch
ExitApplication
End Try
End Sub