Hi, I need some help with a widget home screen
Find bellow part of the widget receiver module I had developped:
This 'hashcode' depends on the user that had authenticated in the Main Activity.
I want the widget to update when I hit Image1 even when the APP is closed.
If I set this 'hashcode' on the Main module as the following:
...the widget updates when I hit Image1 , but ONLY if I have the APP running on the background.
If I close the APP, the widget will not work.
I had tried alternatives (ex: using keyvaluestore on the widget receiver) but with no success.
Any idea ? thanks in advance
Find bellow part of the widget receiver module I had developped:
widget receiver:
Sub Process_Globals
Dim rv As RemoteViews
Dim jobHttp_widget As HttpJob
Dim hashcode as String
End Sub
Private Sub Receiver_Receive (FirstTime As Boolean, StartingIntent As Intent)
If FirstTime Then
rv = ConfigureHomeWidget("WidgetLayout", "rv", 30, "Test")
jobHttp_widget.Initialize("jobHttp_widget", Me)
End If
rv.HandleWidgetEvents(StartingIntent)
End Sub
Private Sub rv_RequestUpdate
jobHttp_widget.Download("https://myurl.com?id=" & hashcode)
End Sub
Sub Image1_Click
jobHttp_widget.Download("https://myurl.com?id=" & hashcode)
End Sub
This 'hashcode' depends on the user that had authenticated in the Main Activity.
I want the widget to update when I hit Image1 even when the APP is closed.
If I set this 'hashcode' on the Main module as the following:
widget receiver:
widget.hashcode = "somehashcode"
...the widget updates when I hit Image1 , but ONLY if I have the APP running on the background.
If I close the APP, the widget will not work.
I had tried alternatives (ex: using keyvaluestore on the widget receiver) but with no success.
Any idea ? thanks in advance