Sub Service_Create
'configure the widget and set it to update every 24 hours (1440 minutes).
rv = ConfigureHomeWidget("WidgetLayout", "rv", 1440, "Quote of the day")
HttpUtils.CallbackActivity = "WidgetService"
HttpUtils.CallbackUrlDoneSub = "UrlDone"
HttpUtils.CallbackJobDoneSub = "JobDone"
parser.Initialize
'Load previous data if such is available.
'This is relevant in case our process was killed and now the user pressed on the widget.
If File.Exists(File.DirInternalCache, QUOTES_FILE) Then
raf.Initialize(File.DirInternalCache, QUOTES_FILE, True)
quotes = raf.ReadObject(0)
raf.Close
Else
quotes.Initialize
End If
If File.Exists(File.DirInternalCache, CURRENTQUOTE_FILE) Then
currentQuote = File.ReadString(File.DirInternalCache, CURRENTQUOTE_FILE)
End If
End Sub