Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

Latest commit

 

History

History
167 lines (100 loc) · 3.52 KB

index.md

File metadata and controls

167 lines (100 loc) · 3.52 KB

TitaniumPebble

For a complete guide on integrating TitaniumPebble in your project, please refer to the README. This document is only a function reference.

Properties

connectedCount

How many Pebble devices are connected to the mobile device.

Note: On Android, this only returns 0 or 1

Return
Type Value
Number The number of connected Pebbles

Functions

setAppUUID

Sets the Pebble application UUID.

Parameters
Name Type Value
uuid String The Pebble application UUID
Return

None

checkWatchConnected

Checks if a Pebble is connected to the mobile device.

Parameters

None

Return
Type Value
Boolean Whether a watch is connected

connect

Connect to the Pebble watch.

Parameters
Name Type Value
params Object
params.success Function The success callback
params.error Function The error callback
Return

None

getVersionInfo

Retrieves version information from the Pebble.

Parameters
Name Type Value
params Object
params.success Function The success callback
params.error Function The error callback
Return
Type Value
Object The version information

launchApp

Launches the Pebble application on the watch.

Parameters
Name Type Value
params Object
params.success Function The success callback
params.error Function The error callback
Return

None

killApp

Closes the Pebble application on the watch.

Parameters
Name Type Value
params Object
params.success Function The success callback
params.error Function The error callback
Return

None

sendMessage

Sends a message to the Pebble.

Parameters
Name Type Value
params Object
params.message Object The message object (see README for formatting example)
params.success Function The success callback
params.error Function The error callback
Return

None

Events

watchConnected

Fires when a Pebble connects to the device.

Note: The Pebble only sends connect/disconnect events when the watch pairing status changes or the watch enter/leaves the range of the phone. For instance, the connect event does not fire if the Pebble is already connected to your phone and you then launch the application.

Event Data

None

watchDisconnected

Fires when a Pebble disconnects from the device.

Note: The Pebble only sends connect/disconnect events when the watch pairing status changes or the watch enter/leaves the range of the phone. For instance, the connect event does not fire if the Pebble is already connected to your phone and you then launch the application.

Event Data

None

update

Fires when a Pebble disconnects from the device.

Event Data
Type Value
Object The message data