GithubHelp home page GithubHelp logo

stepardo / pebble-android-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pebble/pebble-android-sdk

0.0 2.0 0.0 2.14 MB

Android PebbleKit SDK to talk to the Pebble via Bluetooth

License: MIT License

Java 100.00%

pebble-android-sdk's Introduction

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:

  • The weather demo shows how to build an Android application that fetches the weather from the Internet and sends it to an app on Pebble (using the AppSync framework).
  • The Sports demo shows how to build an Android application that starts and communicates with the Sports app embedded in all Pebbles.
  • The Golf demo shows how to build an Android application that starts and communicates with the Golf app embedded in all Pebbles.
  • The Ocean Survey demo shows how to build an Android application that leverages data logging to receive information pushed by a Pebble app.

If you would like to use Eclipse to compile the examples, be sure to review the README-ANDROID.txt file which details how to build and run Pebble Android examples in Eclipse.

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:3.1.0@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-3.1.0-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>3.1.0</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

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

  • The datalogging API has changed in this version. receiveData() now takes java.lang.Long instead of com.google.common.primitives.UnsignedInteger. Otherwise the API has not changed.
  • Guava is no longer a dependency of PebbleKit.
  • Distribute a JAR version of PebbleKit Android for Eclipse users.
  • Fixed a bug where PebbleKit Android could leak cursors.
  • Fixed bug that caused duplicate launcher icons.

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

  • (Bumped version to 2.5 to follow firmware updates)
  • Automatic publication to Sonatype OSS Repo

2.0 - January 2014

  • First release of 2.0 SDK with the new DataLogging API

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.