out of frustration from the missing documentation, I'm posting here what I found about the usage of the new CIQ BLE communication method.
The example usage is:
function onStart(state) {
Comm.registerForPhoneAppMessages(method(:onMsg));
}
function onMsg(message) { // the object received should be a PhoneAppMessage, which is undocumented, but inherits from Message
handleData(message.data.toString());
}
You can set up both the old Mailbox listener and this callback, in that case only registerForPhoneAppMessages will be used.