registerForPhoneAppMessages

Former Member
Former Member
I'm looking to develop a widget that interacts with the users mobile (Android | iOS). However, the registerForPhoneAppMessages method does not appear to exist in the Communications module.
Initially, I thought maybe I had targeted the wrong SDK as it was introduced in 1.4 from what I can see, but that does not appear to be the issue. The odd thing is, the setMailboxListener method also does not appear to be present in that module, which from what I understand was the depereciated method to work with BLE. An example I found even shows a block of code that try to fall-back to the old version:

if(Communications has :registerForPhoneAppMessages) {
Communications.registerForPhoneAppMessages(phoneMethod);
} else {
Communications.setMailboxListener(mailMethod);
}

Toybox.Communications has been imported in the file where the above block is located.

Anyone know where I'm going wrong here?
  • Former Member
    Former Member
    Hi,
    my Forerunner 230 is currently on 1.4.1 and although I implemented both variants in my current project as per latest Comm example, I checked logs and determined that registerForPhoneAppMessages branch is used on actual device.
    To clarify things you need to provide information on the device you're having issues with along with FW and SDK versions, maybe this is specific device FW bug, which needs to be reported in bugs subforum.
  • To clarify things you need to provide information on the device you're having issues with along with FW and SDK versions, maybe this is specific device FW bug, which needs to be reported in bugs subforum.


    True - the specific device is important, as for example, neither call is available on Edge Devices, per the 2.2.2 Change log:

    Remove support for communicating with the mobile Connect IQ SDK in the API for Edge, Oregon, and Rino devices.
  • Former Member
    Former Member
    True - the specific device is important, as for example, neither call is available on Edge Devices, per the 2.2.2 Change log:

    Remove support for communicating with the mobile Connect IQ SDK in the API for Edge, Oregon, and Rino devices.


    Well that settles that then. I did not see anything that indicated it was not available on Edge devices, which is what I'm targeting.

    Are there other methods to interface with a companion app running on Android/iOS then? The only other communication method I'm seeing is the ability to make an HTTP request, which looks like if the Edge is paired via BT to a phone, it simply proxies the call via the phone. - unfortunately, I really want to communicate with an app on the phone.
  • Former Member
    Former Member
    Hey,

    Thanks for pointing this out. This was accidentally hidden, but I have pushed a fix. The documentation should show up with our next SDK release.

    Thanks,
    Coleman