Class: $.CommExample

Inherits:
Application.AppBase show all

Overview

This app demonstrates communication between a device and Garmin Connect Mobile (Android and iOS). Note: Communications.setMailboxListener method has been deprecated in ConnectIQ 4.0.0 and replaced by the Communications.registerForPhoneAppMessages method.

Constant Summary

Constant Variables

Type Name Value Since Description
Type _strings ["","","","",""]

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _crashOnMessage as Lang.Boolean

var _phoneMethod as Lang.Method(msg as Communications.PhoneAppMessage) as Void

var _view as $.CommView

Instance Method Details

crashOnMessage() as Void

Set the app to crash on the next phone message

getInitialView() as [ WatchUi.Views ] or [ WatchUi.Views, WatchUi.InputDelegates ]

Return the initial view for the app

Returns:

  • Array Pair [View, Delegate]

getPhoneMethod() as Lang.Method(msg as Communications.PhoneAppMessage) as Void

Get the callback method for phone app messages

Returns:

  • The phone app messages callback method

getStrings() as Lang.Array<Lang.String>

Get the array of messages

Returns:

  • The last 5 messages

initialize()

Constructor

onPhone(msg as Communications.PhoneAppMessage) as Void

Handle a new phone app message

Parameters:

  • msg —

    The message

onStart(state as Lang.Dictionary or Null) as Void

Handle app startup

Parameters:

  • state —

    Startup arguments

onStop(state as Lang.Dictionary or Null) as Void

Handle app shutdown

Parameters:

  • state —

    Shutdown arguments


Generated Oct 20, 2026, 8:20:31 AM