Widgets, by design have a timeout - they are meant to be for "quick views" of something. (the 1min isn't the same on all watches, BTW - the vivoactive started as 10 seconds, and some run as long as 2 minutes.). For something you want to run until you stop it, make it a watch-app and forget about trying to do it as a widget.
You need to have the widget and watch-app as separate items in the app store, including having different manifest IDs (the manifest.xml is also where you define widget or watch-app.).
Ok, thanks.
What happens if I simply recompile the widget as app and put it on the store? In that case the manifest file would not change and the app IDs would be the same. Does that mean that if somebody installed the widget and the installs the app, that it would simply overwrite it? Or are there other errors to be expected?
Thanks!
Bye
Last I checked, the store will reject the upload if the app changes from a widget to a watch-app. You need to remove the widget from the store if you want to use the same UUID in the manifest, and then, it's a different app and current users won't be switched from the widget to the app version.
If the store allowed the same app to change from a widget to a watch-app or back, I think that would actually confuse users, as suddenly they wouldn't get to your app in the same way.
Hi all!
Can someone tell me whether the situation with the widget’s operation has changed regarding the 1-minute timeout? I'm writing a small application based on checking heart rate, and as far as I understand, I should choose an application instead of a widget if I want the data to continue to be collected in the background?
A background services is a whole different thing. Be it in a widget or app, it's got limits, like it can run at most every 5 minutes and for a max of 30 seconds each time.
But a background service does work with a widget and not just a device app. They also work with watch faces and data fields.
These limit parameters are good for me, the main thing is that it really works in the background.
My task is to constantly have a connection with the heart rate or at least constantly update it in
function onUpdate()
What would be the best choice in my case? App or Widget?
If you need "constant" your only option is a device-app that's always running in the foreground.