Media.startSync Questions

It looks like `Media.startSync` is the way of the future.

With the media player changes in the Vivoactive line-up, it really looks like the old-style ConfigureSync flow is no longer the 'blessed' way forward, and thus, media provider apps must take more control of the content syncing workflow.

Two questions:

(1) Is that more-or-less accurate?

(2) How does `Media.startSync` actually work? In my tests, it doesn't seem to behave in a way that makes sense...

For example:

        LOG.debug("before Media.startSync()");

        Media.startSync();

        LOG.debug("after Media.startSync()");

I would expect given the documentation, that since it 'exits the app' that the 'after' line shouldn't be reached. Yet in testing, it shows up.

Also, when called, I'm not seeing the Content SyncDelegate being called, so I'm not sure how an actual sync would get initiated. All I see is the Wifi-adapter start to initialize and then immediately bail out. (This is on the Fenix 5 Plus from the summit).

Finally, since the Wi-Fi interface is not auto-initialized before we call Media.startSync, that means that our metadata sync will be forced to use the phone connection, whereas previously we were able to piggy back on the wifi-initialization performed by the ContentSync delegate and ConfigureSyncMenu.

I guess the expectation is that the new WiFi initialization APIs will allow music provider apps to manually initialize the Wifi adapter to provide if the phone connection is not present. Is this what roughly what Garmin has in mind?

I know there's a lot bundled in this question, so if you clarification is needed, just let me know. Anxious to here what the best practice is here and whether `Media.startSync` is ready for primetime...

  • Update:

    It looks like a `Ui.popView(Ui.SLIDE_RIGHT);` BEFORE the `Media.startPlayback` causes the content-sync to fail immediately. It's like the `popView` gets queued up and then is applied against the subsequent `Media.startPlayback` sync view, instead of the target 'Connecting` progressbar view it was intended for.

    Strange, but the fix is to just remove the `popView` call...