Welcome to Pebble's official Android SDK!
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.
All Pebble examples are now available on GitHub.
We provide several examples of Android application communicating with Pebble:
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).
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/" }
}
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:
Download the pebblekit-4.0.1-eclipse.jar
file from
Sonatype.
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!
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>
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.
SportsState
helper in the Sports API.ICON_MAX_DIMENSIONS
to be 25px, to be consistent
with watches running 4.0 firmware. If your provided icon exceeds 25px x 25px,
you will encounter a runtime error when calling customizeWatchApp
.PebbleTuple
public and non-final
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.
receiveData()
now takes
java.lang.Long
instead of com.google.common.primitives.UnsignedInteger
.
Otherwise the API has not changed.Important: In this version, DataLogging is only compatible with the Pebble mobile app 2.1+ (currently available in the Android Beta channel).