OAuth Sign In Not Working on 645m

This bug is related to an edge case that seems to be handled correctly on the Vivoactive 3m but not the Fr645m.

When the user has Bluetooth *disabled* on the phone and then enables it, an immediate `makeOAuthRequest` call doesn't trigger a Garmin Connect Mobile 'Sign In' Prompt.

I don't have PoC to share yet, but what's going on is I have a `Timer` that polls `DeviceSettings.phoneConnection`. The second it goes from `false` to `true` it fires off a `makeOAuthRequest` call and the expectation is that this will trigger a 'Sign In' prompt on the phone. The 'Sign In' prompt is consistently available with the Vivoactive and consistently missing on the 645m.

I have tried this yet, but my guess is there's a bit of a race here, and perhaps inserting a delay in the 645m case might workaround the issue. I'll update if this experiement produces a result one way or the other.



  • Former Member
    Former Member
    Okay. We just ran into something like this ourselves and I believe what you are seeing is a result of our findings. Some changes that went into a few devices (some 3.x. devices) for Bluetooth communication had unintended effects on the phoneConnected method. The outcome is that phoneConnected returns "true" as long as there is a BT connection present. In the past, it would only return "true" if Garmin Connect Mobile (GCM) was active. Since OAuth and some other methods need to utilize GCM to prompt the user/handle the method, this is a logic change for some users.

    What is happening for us, and what I think is happening for you is that the device is connected, notifications have been silenced in GCM or GCM has been closed, the request triggers, but the user simply doesn't see this. The good news is that GCM still has an active notification tray at the bottom of the screen. You or your user will likely see a little message indicator. If you open that up, you will be able to launch the OAuth request like normal.

    I know that's not the most elegant solution to this issue, but it's a workaround until we can get this addressed properly. The fix involves some work on the CIQ side and a device firmware change as well, so it will unfortunately take a bit of time to work its way through the ecosystem. I would check to see if this sounds similar with your user before trying to track down a race condition.

    Thanks,
    -Coleman