'So The App Checks Something Then Runs This
StartService(CheckSettings)
'Here is the service file
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim Name As String
Dim ListData As List
Public manager As AdminManager
Dim FTP As FTP
End Sub
Sub Service_Create
End Sub
Sub Service_Start (StartingIntent As Intent)
CheckLostMode
End Sub
Sub Service_Destroy
End Sub
Sub CheckLostMode
If FTP.IsInitialized = False Then
FTP.PassiveMode = True
FTP.Initialize("FTP", "***********", 21, "******", "******")
End If
ListData = File.ReadList(File.DirInternal, "userdata.txt")
Name = ListData.Get(0)
Msgbox(Name, "")
FTP.PassiveMode = True
FTP.DownloadFile(Name & ".txt" , False, File.DirInternal, "userdata.txt")
End Sub