'Service module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim PE As PhoneEvents
Dim PhoneId As PhoneId
End Sub
Sub Service_Create
PE.InitializeWithPhoneState("PE", PhoneId)
End Sub
Sub Service_Start (StartingIntent As Intent)
PE.InitializeWithPhoneState("PE", PhoneId)
End Sub
Sub Service_Destroy
PE.StopListening
End Sub
Sub PE_ConnectivityChanged (NetworkType As String, State As String, Intent As Intent)
Log("-----------------------------------")
Log("")
Log("ConnectivityChanged: " & NetworkType & ", state = " & State)
Log(Intent.ExtrasToString)
End Sub