Get Comm sample working

Former Member
Former Member

I'm trying to get the Comm sample to work using the Connect IQ Device Simulator launched from Eclipse, and an Android Emulator launched from Android Studio. 

I'm using the OOTB Comm sample for both the Watch App and the Android App, just trying to get the basics to work.

I found the thread telling me that I need to modify the Android App to TETHERED (from WIRELESS) by .....

mConnectIQ = ConnectIQ.getInstance(this, IQConnectType.TETHERED);

And I run

adb forward tcp:7381 tcp:7381

When I run the two simulators (Watch and Phone) and start the ADB Connection from the Watch Simulator the phone simulator App changes from UNKNOWN to CONNECTED, so that's encouraging :-)

But as others have reported (but I haven't seen a solution to) I have the following problems on the Phone App :-

  • Tap the "Hello World" message (which should send the string to device) throws an alert "ADB Disconnected" , the message is not displayed on the Watch Simulator and it's disconnected the Watch from ADB.
  • On the Phone Simulator if I click on "Tap here to open the Comm app on the device" it shows (on the Phone) "Opening App....." then "App Status: APP_IS_NOT_INSTALLED"

Somebody else reported that they were able to send messages from the Watch Simluator to the phone, but I'm not clear how you're supposed to do that. The watch says "Connect a phone then use the menu to send strings to your phone", but how do I do that in the Simulator? 

Any suggestions please?

Thanks

David

  • Former Member
    0 Former Member over 4 years ago

    Seems like the problem is that the Vivoactive 3 button does nothing in the simulator...works OK with the Approach S60 watch in the simulator

  • The button on the va3 is the top button on the s60.  The middle button on the s60 is "menu", which is a long screen press on the va3

  • Former Member
    0 Former Member over 4 years ago in reply to jim_m_58

    Ah...bingo, it works with VA3 now too, thanks

  • Hi David,

    Since your issue seems to have been solved, please allow me one further question. How did you manage to install the Comm App sample on the Android simulator? Whenever I run the Comm App in the Simulator it prompts me to install Garmin Connect in the simulator as well but this fails because Google App Store tells me that Garmin Connect is not compatible with the device (I use the Pixel 2 Virtual device). Any help would be appreciated Slight smile

    Thanks a lot!

  • You should change the IQConnectType in the MainActivity during the onCreate from WIRELESS to TETHERED to active simulation mode instead of the normal operation.

    // Here we are specifying that we want to use a WIRELESS bluetooth connection.
    // We could have just called getInstance() which would by default create a version
    // for WIRELESS, unless we had previously gotten an instance passing TETHERED
    // as the connection type.
    mConnectIQ = ConnectIQ.getInstance(this, IQConnectType.TETHERED);

    With this option it is posible to send messages from the device to the phone. But I still didn't find a way to send messages from the phone to the device (still having the status "APP_IS_NOT_INSTALLED" and the adb will be aborted.