@Override
public void onIncomingMessage(GTBaseMessageData gtBaseMessageData)
{
Toast.makeText(getApplicationContext(), gtBaseMessageData.getText(), Toast.LENGTH_SHORT).show();
}
It works, when I press the button I see the message getting sent and the receiving GoTenna lightning up, but the message doesn’t get delivered from the GoTenna to the app.
This is my trace:
11-16 14:11:37.425 9350-9396/? E/bt_btif: bta_gattc_cmpl_cback unknown conn_id = 4, ignore data
11-16 14:11:37.438 9668-10514/com.example.root.gotennaapp I/GTEventNotifier: COMMAND 174 STARTING: SENDING GET MESSAGE
11-16 14:11:37.496 9350-9396/? E/bt_btif: bta_gattc_cmpl_cback unknown conn_id = 4, ignore data
11-16 14:11:37.556 9350-9396/? E/bt_btif: bta_gattc_cmpl_cback unknown conn_id = 4, ignore data
11-16 14:11:37.617 9350-9396/? E/bt_btif: bta_gattc_cmpl_cback unknown conn_id = 4, ignore data
11-16 14:11:37.619 9668-9680/com.example.root.gotennaapp I/GTEventNotifier: GET MESSAGE via KEEP ALIVE - RESPONSE POSITIVE
11-16 14:11:37.653 9668-9668/com.example.root.gotennaapp I/GTEventNotifier: COMMAND 175 STARTING: DELETE LAST MESSAGE
11-16 14:11:37.888 9350-9396/? E/bt_btif: bta_gattc_cmpl_cback unknown conn_id = 4, ignore data
11-16 14:11:37.891 9668-10514/com.example.root.gotennaapp I/GTEventNotifier: DELETE LAST MESSAGE - RESPONSE POSITIVE
11-16 14:11:37.891 9668-10514/com.example.root.gotennaapp I/GTEventNotifier: COMMAND 176 STARTING: SENDING GET MESSAGE
11-16 14:11:37.977 9350-9396/? E/bt_btif: bta_gattc_cmpl_cback unknown conn_id = 4, ignore data
11-16 14:11:37.978 9668-9679/com.example.root.gotennaapp I/GTEventNotifier: GET MESSAGE - RESPONSE NEGATIVE
What is the problem here?
Thank you for your help.
From your Android logs it looks like the receiving Android app is able to pull the sent message. Are you filtering the logs by GTEventNotifier? If so could you check if there are any other Warning or Error logs that might have a different log tag?
It would also help to print a log in both onIncomingMessage(GTBaseMessageData baseMessageData) as well as onIncomingMessage(GTMessageData messageData) of the GTMessageListener. If the SDK was able to de-serialize the message into a GTBaseMessageData object then onIncomingMessage(GTBaseMessageData baseMessageData) otherwise it will fallback to onIncomingMessage(GTMessageData messageData).
I did my fair share of googling before posting on the forum. Yes, it looks like there is some lower level problem, but why is it happening?
Is there a lower bound on the API SDK and Android OS version to use the GoTenna SDK?
Could it be that my token expired? I really can’t find a solution to this.
@WiseLudo@mficiencies we are releasing a new version of the SDK this week. Probably best to give that a go and see if the update resolves your issues. If not we can certainly dig deeper and see whats going on.
@MikeR it’s pretty weird. The PubliSDK sample app works fine, so it’s not a hardware problem.
Can anyone assist me with this? Maybe MainActivity isn’t supposed to implement GTConnectionListener, GTCommandCenter.GTMessageListener (that’s what I’m doing in my app)?
I was doing the same thing on another app, but I had a Fragment that implemented GTConnectionListener, GTCommandCenter.GTMessageListener and it worked. Is it because of that?
@WiseLudo@mficiencies Please ensure that you call GTCommandCenter.getInstance().setMessageListener( GTCommandCenter.GTMessageListener gtMessageListener); to receive the proper callbacks.