Varand Pezeshkian
Varand Pezeshkian

Reputation: 520

Android: change app widget's text on runtime before update time!

someone please tell me how can I update the TextView that is on app Widget, before default update period time is come.?.?.?.(30,om, or 1h... I set on 30mins but It updates on 1h)

So I have an activity which decides what is the final text on the widget, and it may be changed by user in the runtime, so after user changes something I should be able to show the final changes on widget (immediately),but I can't. how can I achieve this?

many thanks guys.

Upvotes: 0

Views: 790

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006869

how can I achieve this?

Just update the app widget via an AppWidgetManager. There is nothing magic about the "update time" -- you can update your app widget at any point. Construct your RemoteViews, configure them, and use the AppWidgetManager to push over the change to the home screen.

Upvotes: 2

Related Questions