Coder Social home page Coder Social logo

bencoman / android-bluetooth-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pixplicity/android-bluetooth-demo

0.0 2.0 0.0 232 KB

This project demonstrates communicating with a bluetooth device in an Android app.

License: MIT License

Java 100.00%

android-bluetooth-demo's Introduction

Android Bluetooth LE Demo

Bluetooth Low Energy is a special version of Bluetooth that allows wireless communication with devices using very little power, which makes it suitable for mobile phones as well as battery powered devices such as beacons, heart rate monitors and other sensors. It has been available in Android since 4.3 (Jelly Bean).

This project demonstrates how to communicate with a device using Bluetooth LE. It is set up as a working app project that you can import into Android Studio or compile using Gradle from the command line. It covers searching for nearby devices, sending data and receiving updates from the remote device.

Running the project

Some UUIDs of services and characteristics are hard-coded in the project. If you know the UUIDs of the device you're testing with you should alter those values before running the project.

In this project

This app covers the following topics:

  • Checking if Bluetooth is enabled and requesting the user to enabled it if needed
  • Starting a search for Bluetooth devices
  • Connecting to a device of interest
  • Sending a byte to the remote device
  • Receiving updates whenever a value on the remote device changes.

Note that we use the Jelly Bean (4.3) APIs for communication, even though those are deprecated in Lollipop (5.0), because the new APIs are only available from 5.0 and up.

android-bluetooth-demo's People

Contributors

mathijspix avatar

Watchers

 avatar  avatar

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.