Please see post #6 for solution project source code for update widget from the app and open the app from the widget.
Taking widget (receiver) example,
I added a button to the main page.
I need to update the widget (current time) when I press the button of the app.
Since it is a B4xPages app, I can not
which I did in Activity (old) app.
So, what code should I write here ?
I did search the Forum but could not find any example/solution for it.
Attached is the project with the changes.
Taking widget (receiver) example,
Android home screen widgets tutorial - part I
Edit: widgets are handled with receivers now. See the attached example. This tutorial will explain how to implement your own home screen widgets (also named App Widgets). It is important to understand that the widgets are created and managed in another process, different than the process that...
www.b4x.com
I added a button to the main page.
I need to update the widget (current time) when I press the button of the app.
Since it is a B4xPages app, I can not
B4X:
Activity.Finish
So, what code should I write here ?
B4X:
Private Sub Button1_Click
xui.MsgboxAsync("Update Widget. " & DateTime.Time(DateTime.Now), "")
' want to update the widget now.
' what code to write here ?
' WidgetReceiver. ??
End Sub
I did search the Forum but could not find any example/solution for it.
Attached is the project with the changes.
Attachments
Last edited: