I want to send data from the Garmin watch to the A companion Android app. I went through this link https://developer.garmin.com/connect-iq/core-topics/mobile-sdk-for-android/
and I could connect these two apps, Also I used transmit.Comm to send data from watch app and I checked it and it sends data properly(transmit complete). But my Android app doesn't receive the data unfortunately. My problem is on the last part (Onmessagereceived) isn't called. Can anyone help me with this issue? here is my code for this part.
try {
mConnectIQ.registerForAppEvents(mDevice, mmMyApp, new IQApplicationEventListener() {
@Override
public void onMessageReceived(IQDevice iqDevice, IQApp iqApp, List<Object> message, ConnectIQ.IQMessageStatus iqMessageStatus) {
StringBuilder builder = new StringBuilder();
if (message.size() > 0) {
for (Object o : message) {
builder.append(o.toString());
}
} else {
builder.append("Received an empty message from the application");
}
String received = builder.toString();
((TextView) findViewById(R.id.textView2)).setText(received);
((TextView) findViewById(R.id.textView3)).setText("done");
}
});