Class: $.CommExample
- Inherits:
-
Application.AppBase
-
Application.AppBase
-
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
- _crashOnMessage as Lang.Boolean
- _phoneMethod as Lang.Method(msg as Communications.PhoneAppMessage) as Void
- _view as $.CommView
Instance Method Summary collapse
-
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.
-
getPhoneMethod() as Lang.Method(msg as Communications.PhoneAppMessage) as Void
Get the callback method for phone app messages.
-
getStrings() as Lang.Array<Lang.String>
Get the array of messages.
-
initialize()
Constructor.
-
onPhone(msg as Communications.PhoneAppMessage) as Void
Handle a new phone app message.
-
onStart(state as Lang.Dictionary or Null) as Void
Handle app startup.
-
onStop(state as Lang.Dictionary or Null) as Void
Handle app shutdown.
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
getPhoneMethod() as Lang.Method(msg as Communications.PhoneAppMessage) as Void
Get the callback method for phone app messages
getStrings() as Lang.Array<Lang.String>
Get the array of messages
initialize()
Constructor
onPhone(msg as Communications.PhoneAppMessage) as Void
Handle a new phone app message
onStart(state as Lang.Dictionary or Null) as Void
Handle app startup
onStop(state as Lang.Dictionary or Null) as Void
Handle app shutdown