You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/update-widget.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ sidebar_label: Update Widget
5
5
6
6
# Update Widget
7
7
8
-
There are two ways to update a widget once it is added on the home screen.
8
+
There are three ways to update a widget once it is added on the home screen.
9
9
10
10
## updatePeriodMillis
11
11
@@ -37,3 +37,9 @@ More details about `updatePeriodMillis` on the [official documentation](https://
37
37
## requestWidgetUpdate
38
38
39
39
You can call [`requestWidgetUpdate`](./api/request-widget-update.md) any time when your app is open as a result of some user action, and request a widget update.
You can request a widget update from native code (using BroadcastReceiver, AlarmManager, received push notification...).
44
+
45
+
You can call `com.reactnativeandroidwidget.RNWidgetJsCommunication#requestWidgetUpdate` static method with a context and the name of the widget you want to update, and it will call the javascript `widgetTaskHandler` function with `widgetAction = 'WIDGET_UPDATE'`
0 commit comments