Sub GPSTrack_ConnectionSuspended(SuspendedCause1 As Int)
Dim Cause As String
Log("ConnectionSuspended")
If(SuspendedCause1=GPSTrack1.SuspendedCause.CAUSE_NETWORK_LOST) Then
Cause="Suspended by NetworkLost"
Else If(SuspendedCause1=GPSTrack1.SuspendedCause.CAUSE_SERVICE_DISCONNECTED) Then
Cause="Suspended by Disconnected"
Else
Cause="Suspended: Unknow cause"
End If
DateTime.DateFormat="dd-MM-yyyyy"
Cause=Cause&": "&DateTime.date(DateTime.Now)&"_"&DateTime.Time(DateTime.Now)
Log(Cause)
GPSTrack1.Disconnect
FromFailed=FromFailed+1
GPSTrack1.Connect
End Sub