PebbleKit Android

Welcome to Pebble's official Android SDK!

Communication with Pebble

On Android, all communication between apps and Pebble go through the official Pebble Android application via intents.

PebbleKit Android provides a convenience layer on top of those intents.

Documentation

Examples

All Pebble examples are now available on GitHub.

We provide several examples of Android application communicating with Pebble:

Using PebbleKit Android

As of version 2.5, PebbleKit Android is distributed as a library on the Sonatype OSS Repository. Source code and Android library (.aar) are also available.

A specific library is available for Eclipse users (Eclipse does not support the .aar library format).`

You must install the official Pebble Android application to use PebbleKit Android.

PebbleKit Android requires Android SDK version 14 or higher (4.0 and above).

Using PebbleKit Android with Android Studio and Gradle

In Android Studio, or on any Gradle project, you can add PebbleKit Android in your app/build.gradle file:

dependencies {
    compile 'com.getpebble:pebblekit:4.0.1@aar'
}

Make sure that you also include a reference to the Sonatype OSS Repository:

repositories {
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/groups/public/" }
}

Using Eclipse

To use PebbleKit in the Eclipse IDE you must import the .jar file that contains the PebbleKit Android SDK. To install, follow the instructions below:

  1. Download the pebblekit-4.0.1-eclipse.jar file from Sonatype.

  2. Add the file to your Android project in the libs folder alongside the AndroidManifest.xml file. This should automatically add it to your build path after refreshing the Android project. If not (or you saved it elsewhere) right-click the file and choose Build Path->Add to Build Path.

You can now use PebbleKit in your Eclipse Android project!

Using PebbleKit Android with Maven

If you are using Maven, you can add the following dependency in your pom.xml:

<dependency>
    <groupId>com.getpebble</groupId>
    <artifactId>pebblekit</artifactId>
    <version>4.0.1</version>
    <type>aar</type>
</dependency>

Using PebbleKit Android library directly

Finally you can also download the AAR file for PebbleKit Android and add it directly into your project.

Note: The AAR file format is currently not supported by Eclipse.

Changelog

4.0.1 - November 2016

4.0.0 - November 2016

3.1.0 - April 2016

3.0.0 - March 2015

This version provides support for the upcoming Pebble Time and Pebble Time Steel watches. You must re-compile your application with this version of PebbleKit otherwise you will not be able to detect (PebbleKit.isWatchConnected()) the new Pebble watches.

There are no other changes in this version.

2.6.0 - November 2014

Important: In this version, DataLogging is only compatible with the Pebble mobile app 2.1+ (currently available in the Android Beta channel).

2.5.0 - August 2014

2.0 - January 2014