Complete

Possible Bug - Returning to app after using makeWebRequest using Sync - over Wi-Fi using the 3.1 Toybox.Communications.SyncDelegate.

Hi, I'm using direct connection to wifi to get data from a web service (without being connected to a mobile phone). All works really well and I can start sync, gather data and display it on my device, but I don't quite follow what happens when I send notifySyncComplete and how to correctly resume my widget app.

The limited info available says - 'The Sync UI will be popped off the stack returning you to your app'.

However I get left on the sync complete view and I'm not sure what state my app (widget in this case) is in. 

Are there examples or instructions on the correct flow here ? Any help appreciated. Cheers.

Connect IQ 3.1 Connects You to The World - News & Announcements - Connect IQ - Garmin Forums

In Connect IQ 3.1 device apps now can initiate network requests over Wi-Fi using the new Toybox.Communications.SyncDelegate. Here’s how:

  1. In your app, call Toybox.Communications.startSync
  2. The system will call getSyncDelegate() to get your Toybox.Communications.SyncDelegate subclass
  3. The device UI will go to a sync screen
  4. In onStartSync make your first call to Toybox.Communications.makeWebRequest
  5. Request one item at a time, triggering each makeWebRequest in the callback of the previous one
  6. Call notifySyncProgress to advance the progress bar
  7. If onStopSync is called, handle shutdown of your sync
  8. When you have downloaded all items, call notifySyncComplete. Pass in null if you completed successfully or pass in a string if you need to display an error message
  9. The Sync UI will be popped off the stack returning you to your app

Returning to app after using makeWebRequest using Sync - over Wi-Fi using the 3.1 Toybox.Communications.SyncDelegate. - Discussion - Connect IQ - Garmin Forums

For reference - It happens in the SIM, and for me it is 945. I checked the Bulk Download SDK example (which is Fenix 5), and observe the same behaviour (of course, it is less clear if this is the intended behaviour for the SDK Example). 

Here is the SDK example in SIM, with screen grab, after the download completes, it sits on this view and the buttons do not operate. It's the equivalent I found in my application. I appreciate that there may be some action that was intended from the App to exit the Sync and resume App.