I have a Problem with my Sony SmartWatch App. I've developed a widget with control, but after the App is installed by users on the device the scheduled refresh task of the widget starts automatically. This means the refresh task is running all the time, even if the user did not turn on SmartWatch Display or start the widget. This drains the battery. If I go to the widget screen and then turn the display from off, the scheduled Task stops like expected. But if I don't do this the task is running and running and running.... How can I detect if the Display is on and the widget is running?
Thank you very much!
P.S.: It makes no difference if the "Activate Widget" preference is checked or not....
EDIT: I've found out that the widget sourcecode does not fire if I uncheck the "Display as Widget" Checkbox in preferences. This means if the refresh schedule is running and I uncheck this box, the onDestroy is never called and so the cancel schedule also not....