When I add comm.transmit to my connectIQ app, it build with no error but my app Displays "IQ!" exactly after that page. How can I solve this issue? what can be the reason?
This the part of my code related to Communication:
using Toybox.Communications as Comm;
if (Communications has :registerForPhoneAppMessages) {
Communications.registerForPhoneAppMessages();
} else if (Communications has :setMailboxListener) {
Communications.setMailboxListener();
}
var connectionListener = new TascCommListener();
try {
Communications.transmit("Hello", null, connectionListener);
} catch (ex) {
System.println(ex.getErrorMessage());
}
class TascCommListener extends Comm.ConnectionListener{
static var SUCCESS = 0;
static var FAILURE = 1;
hidden var mCallback;
function initialize(){
Comm.ConnectionListener.initialize();
Communications.ConnectionListener.initialize();
}
function onComplete() {
System.println("Transmit Complete");
}
function onError() {
System.println("Transmit Failed");
}
}