Why is it not possible to update the widget out of an activity module?
I tried the following code, but the widget doesn't dates up....
'Activity-Module'
Thanks for help....
I tried the following code, but the widget doesn't dates up....
B4X:
'Service module of the widget (WidgetS)'
Sub Process_Globals
Dim rv As RemoteViews
End Sub
Sub Service_Create
rv = ConfigureHomeWidget("WidgetPortrait", "rv", 0, "Foxfinder",True)
End Sub
Sub Service_Start (StartingIntent As Intent)
If rv.HandleWidgetEvents(StartingIntent) Then Return
End Sub
Sub rv_RequestUpdate
Widget_check
End Sub
Sub Widget_check
If Main.Passwortzugang=True Then
rv.SetTextColor("Label4",Colors.Green)
rv.SetText("Label4","Aktiv")
Else
rv.SetTextColor("Label4",Colors.White)
rv.SetText("Label4","Nicht aktiv")
End If
rv.UpdateWidget
End Sub
'Activity-Module'
B4X:
.....
CallSub(WidgetS,"Widget_check")
...
Thanks for help....