No callback from getApplicationInfo sdk 2.1

Hi,

I'm using new sdk 2.1 with Edge 1000 and Samsung Galaxy s6 (6.0.1). With the Comm sample widget supplied by Garmin, I am not receiving the onApplicationInfoReceived event.
Trying to send or receive data doesn't works.

Any help would be greatly appreciated!

Thanks.
  • Former Member
    Former Member over 9 years ago
    Yesterday my FR230 received FW 5.40 and still issue persists:
    I had FW 4.70, agreed to upgrade, after update was installed information transfer from and to mobile worked fine even on FW 5.40. During the night I usually turn the airplane mode on for the phone, this means, that Bluettoth connection to watch was also severed. Next day after I turned Bluetooth on the watch and turned off the airplane mode on phone, neither communication direction was working for the Android companion app. I had to downgrade to 4.70 once again, after that communication got back to normal.

    Bug can be easily reproduced using standard Comm example.
  • Former Member
    Former Member over 9 years ago
    Yesterday my FR230 received FW 5.40 and still issue persists:
    I had FW 4.70, agreed to upgrade, after update was installed information transfer from and to mobile worked fine even on FW 5.40. During the night I usually turn the airplane mode on for the phone, this means, that Bluettoth connection to watch was also severed. Next day after I turned Bluetooth on the watch and turned off the airplane mode on phone, neither communication direction was working for the Android companion app. I had to downgrade to 4.70 once again, after that communication got back to normal.

    Bug can be easily reproduced using standard Comm example.


    There was a newer communication protocol that got added just above the BLE layer which Connect Mobile was supposed to support months ago so when devices started to roll it out everything would just work. This protocol change in relation to Connect IQ was implemented in iOS but was not propagated to Android. A lot of the newer device firmwares have started to switch over to this newer protocol which is why you saw things break when switching from 4.70 to 5.40 (I believe there's some caching going on which is why it worked briefly after updating). A change was merged into the Android code base which is believed to address this issue and will be a part of the 3.10 GCM Android release.

    Sorry for the inconvenience and we appreciate the information you posted here as it truly did help identify the issue.
  • Former Member
    Former Member over 9 years ago
    There was a newer communication protocol that got added just above the BLE layer which Connect Mobile was supposed to support months ago so when devices started to roll it out everything would just work. This protocol change in relation to Connect IQ was implemented in iOS but was not propagated to Android. A lot of the newer device firmwares have started to switch over to this newer protocol which is why you saw things break when switching from 4.70 to 5.40 (I believe there's some caching going on which is why it worked briefly after updating). A change was merged into the Android code base which is believed to address this issue and will be a part of the 3.10 GCM Android release.

    Sorry for the inconvenience and we appreciate the information you posted here as it truly did help identify the issue.


    Do you mean 4.10 GCM (as we're currently on 3.9)?

    Any ETA on this release as I am struggling with this issue as well?
  • Former Member
    Former Member over 9 years ago
    Do you mean 4.10 GCM (as we're currently on 3.9)?

    Any ETA on this release as I am struggling with this issue as well?


    As far as I know the next version number is 3.10. The release dates for GCM are under the control of the Connect Mobile team but I believe the code freeze for the release was last week so I would expect to see a release soon. I'm not sure what the usual turnaround time from code freeze to release is.
  • Former Member
    Former Member over 9 years ago
    As far as I know the next version number is 3.10. The release dates for GCM are under the control of the Connect Mobile team but I believe the code freeze for the release was last week so I would expect to see a release soon. I'm not sure what the usual turnaround time from code freeze to release is.


    Thank you for the update.

    I can confirm that, as of GCM 3.10, getApplicationInfo callback is working.

    Thanks again!
  • Former Member
    Former Member over 8 years ago
    Seems like this problem has reappeared or no one has tested this behavior in a way I did.

    Problem: if there are at least two of the companion applications on on phone talking to two different applications with their own app ID's on watch respectively, then in the same phone reboot cycle first application launched will work fine, but the second one won't receive getApplicationInfo callback for the first time it'll try to acquire ConnectIQ instance, even more unexpected is the fact that the first application if it's still running will receive this callback instead. This will happen only once for the second app: if it's started for the second time, then callback will be received.

    I discovered this by running a widget on phone, which acquires ConnectIQ instance and keeps it during it's lifecycle. This widget is still in development therefore it has a rather extensive logging system. I noticed, that after I added widget to the home screen, it sent info to the watch, then I started another one of my applications, which is the companion app and instantiates ConnectIQ on start releasing it on exit. Strangely enough, at the same time I received getApplicationInfo callback with the widget app ID in my widget, the companion app didn't receive this callback and was unable to send data to watch until I force closed and restarted it. For the second time ConnectIQ instance was initialized correctly and no fake callback was given to previous application. If I delete widget from the home screen and add it once again, then this time widget won't receive getApplicationInfo callback for the first time it tries to initialize connection despite previously run twice companion application is already closed.

    Therefore I consider, that current implementation of Android BLE SDK doesn't reinitialize some variables during instantiation and keeps traces of the previous connections. The only workaround I found so far is to start a timer/handler to wait for a set amount of time (e.g. 30 seconds) and if getApplicationInfo callback is not received before timer expires, then I shut down and restart ConnectIQ connection, which helps to initialize the connection correctly. This is identical to acquiring ConnectIQ instance twice sequentially, but the timer solution seems to be more appropriate choice to me in this situation.

    If someone from Garmin development team will check this thread, then please, let me know whether additional info is needed for this problem to be transferred to GCM team.
    Thanks in advance.
  • Former Member
    Former Member over 8 years ago
    Hello,

    Thanks for clarifying in your post. I've created a ticket to investigate what should be happening in this case. What you describe is pretty unique so I'm consulting with the team. Once we determine what should be happening I will probably want to start a new thread in the bug reports forum to track it there.

    Thanks again!
    -Coleman