1

i would like to implement an android widget using Glance that is basically updated regularly, at least each minute.

the updatePeriodMillis property used in the manifest file allows for updates no faster that 30 minutes, while using the WorkManager the updates can be reduced to 15 minutes but not ofter.

how can i actually update the widget on a minute basis?

thanks.

memical
  • 2,353
  • 1
  • 24
  • 36

1 Answers1

0

For clocks there are clock widget's you can embed and edit (See https://developer.android.com/reference/android/widget/TextClock)

For interactive widgets (such as note recording) you should use a foreground services to keep the worker alive and updating while the user is actively interacting with the widget.

In general widgets are not for real time or interactive use cases.

  • 1
    the use case is not an interactive one. the only thing that happens is that the widget - on tap - will open the app. but it displays some info from the app that needs to be updated quite often – memical Jul 25 '23 at 07:10