Acknowledged

SDK 4.1.5 - For widgets the Toybox.Activity.getActivityInfo() doesn't work @ F7/Epix series

SDK 4.1.5 - For widgets the Toybox.Activity.getActivityInfo() doesn't work @ F7/Epix series

Data like speed, distance etc. are not provided at widget apps for the F7 and Epix series since introduction of the devices.

When the widget app is opened the GPS track recording of the activity (that was previously started and now runs in the background) is stopped and the data is not available anymore.

Repro:

- start a gps supported activity like *running*

- long press the 'back' button to get the watch face view displayed

- toggle through the widget glances and select one to open the widget

-> the GPS recording is stopped of the activity

For additional debug information you can use the following widget to analyse also the activity data like distance and speed, that are also not provided for all opened widgets:

https://apps.garmin.com/en-US/apps/ffcee43d-ef4f-4175-a55a-c46b6cc2918d

Please fix!

Parents
  • Here the solution for all developers out there to provide a stable widget app that doesn't interrupt the GPS recording of a running activity app in the background.

    Simple add this one line of code to get a GPS position event triggered in your widget. (Position.enableLocationEvents(Posiiton.LOCATION_CONTINUOUS, null);)

    using Toybox.Position as Position;
    
    class YourWidgetAppView extends Ui.View {
        function initialize() {
            Position.enableLocationEvents(Posiiton.LOCATION_CONTINUOUS, null);
            View.initialize();
        }
    }

Comment
  • Here the solution for all developers out there to provide a stable widget app that doesn't interrupt the GPS recording of a running activity app in the background.

    Simple add this one line of code to get a GPS position event triggered in your widget. (Position.enableLocationEvents(Posiiton.LOCATION_CONTINUOUS, null);)

    using Toybox.Position as Position;
    
    class YourWidgetAppView extends Ui.View {
        function initialize() {
            Position.enableLocationEvents(Posiiton.LOCATION_CONTINUOUS, null);
            View.initialize();
        }
    }

Children
No Data