Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1"
'print the result to the logs
'Log(Job.GetString)
Case "Job2"
'print the result to the log
Log(Job.GetString)
If Job.GetString > 0 Then
Dim ln As Notification
ln.Initialize(DateTime.Now) '(DateTime.Now + 6 * DateTime.TicksPerSecond) '6 seconds from now
ln.IconBadgeNumber = 1
ln.AlertBody = AlertMessage
ln.PlaySound = True
ln.Register
'hd.ToastMessageShow("Notification will fire in 6 seconds.", False)
End If
Case "Job3"
'print the result to the logs
'Log(Job.GetString)
End Select
Else
Log("Error: " & Job.ErrorMessage)
End If
Job.Release
End Sub
Sub Application_ReceiveLocalNotification (LN As Notification)
'this event will fire if the scheduled notification happend when the app was running
hd.ToastMessageShow(LN.AlertBody, True)
PlayNotification(1007)
End Sub