Coder Social home page Coder Social logo

meu-android-sdk's Introduction

MeU Android SDK

About

version: 0.0.2

Simple implementation to connect to a MeU and send text, images or custom data over bluetooth.

What is the MeU? It's a flexible, wearable, programmable LED panel.

Repository Structure

This repository has 3 folder.

  • SDK-libs This folder contains 2 jar files needed to incorporate the SDK into your project.
  • MeU This folder contains the source code for the MeU SDK, and may be used a reference, or modified as desired.
  • MeuSample This folder contains the sample project.

Usage

The current implementation provides for 2 jar files which should be included into the projects build path. This may be achieved by adding these files to the libs folder in an eclipse based android project.

Make sure the your project has bluetooth permissions. You can obtain these by adding the following lines to your AndroidManifest.xml, before the <application ...> tag

<uses-permission android:name="android.permission.BLUETOOTH" />

Create and initialize an instance of the SDK like so:

MeU MeU = new MeU();

and initiate the bluetooth connection using the SSID of the MeU, like so:

MeU.setupBluetooth(getApplicationContext(), "00:06:66:6A:CB:9A");

Make sure to replace the SSID above with the one for your MeU.

Now you are read to send text, using the sendText method.

MeU.sendText("This is awesome!");

MeU.sendText("I like RED!", "FF0000");

Or bitmaps using

MeU.sendImage(mBitmap);

Or if you modify the code running on the MeU you can still use this library to connect and send custom strings using

MeU.sendRaw("YOUR CUSTOM STRING HERE");

There are a few more methods available (such as listing currently available MeUs, getting the bluetooth status etc). The full source and a sample app is bundled in this repository for reference.

That's pretty much it, enjoy!

Sample

I've also include a sample app to help you along should you get stuck somewhere. Here's what it looks like:

Sample App

Feedback

This was pretty much hacked together in a couple hours to make development easier for others. If there's enough interest, I'll make time to fix this up by adding proper interfaces for event handling AND a disconnect and clean up method.

Should you find any bugs please feel free to reach me @ ankitg[at]gmail[dot]com

Credits

All images used in the sample are for educational purposes only and are properties of their respective copyright owners.

The SDK makes use of the btserial library (under the GPL / LGPL licenses).

The sample references the Holo Color Picker which is under the Apache License.

Special thanks to Robert Tu from MeU for lending me the hardware to make this project possible.

meu-android-sdk's People

Contributors

ankitg avatar

Watchers

 avatar James Cloos avatar

Forkers

meuleds

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.