Android Question [SOLVED] HomeWidget and Service_Start

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello,

I do not know if I well understand how the HomeWidget's life cycle works. I would like to update a widget's image calling the widget service from another service.

Am I correct if I use a StartServiceAt(widget,datetime.now+500,true) and in the widget's Service_Start :

B4X:
Sub Service_Start (StartingIntent As Intent)


  MySub  ' => Call to the sub to choose the image that will be displayed on the widget

    rv.UpdateWidget   ' updates the widget's image

    If rv.HandleWidgetEvents(StartingIntent) Then Return ' the code Erel always provides ;-)

End Sub

Many thanks
 
Last edited:

lemonisdead

Well-Known Member
Licensed User
Longtime User
Many thanks Erel for the quick reply. I feel more confident on my coding now
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…