Sub Process_Globals
Dim note As Notification
Dim ph As PhoneWakeState
Dim soc As Socket
Dim tmr As Timer
Dim suc, fail As Int
End Sub
Sub Service_Start (StartingIntent As Intent)
note.Initialize
note.Icon="icon"
note.SetInfo("title","body",Main)
note.Notify(1)
Service.StartForeground(1,note)
tmr.Initialize("tmr",60000)
tmr.Enabled=True
ph.PartialLock
End Sub
Sub tmr_Tick
soc.Initialize("network")
soc.Connect("XXX.XXX.XXX.XXX",123,2500)
End Sub
Sub network_Connected (connected As Boolean)
If(connected=True) Then
suc=suc+1
Else
soc.Close
fail=fail+1
End If
End Sub
Sub network_NewData (msg() As Byte)
End Sub
Sub network_Error
soc.Close
End Sub
Sub network_Terminated
soc.Close
End Sub