Giter VIP home page Giter VIP logo

ble-starter-android's Introduction

Punch Through Android BLE Starter App

Note

This project is currently up-to-date as of compileSdkVersion and targetSdkVersion of 34 (Android 14).


CircleCI build status

Companion Android app project for Punch Through's "Ultimate Guide to Android BLE Development" blog post for beginners, with examples of how to perform basic BLE operations and some Android BLE tips and tricks on the following:

  • Scanning for nearby BLE devices
  • Connecting to BLE devices
  • Discovering services and characteristics
  • Requesting an ATT MTU update
  • Reading and writing data on characteristics and descriptors
  • Enabling and disabling notifications and indications on characteristics
  • Bonding with a BLE device
  • Implementing your own BLE operations serial queuing mechanism

Setup

  1. Clone the project to your directory of choice.
git clone https://github.com/PunchThrough/ble-starter-android.git
  1. Launch Android Studio and select "Open an existing Android Studio project".
  2. Navigate to the directory where you cloned the project to, and double click on it.
  3. Wait for Gradle sync to complete.

Requirements

This project targets Android 14 and has a min SDK requirement of 21 (Android 5.0), in line with our recommendation in 4 Tips to Make Android BLE Actually Work.

Contributing

Reporting bugs

Please open an issue to report a bug if the app isn't behaving as expected.

Opening a Pull Request

Please fork the repository and create a feature branch before opening a Pull Request against the master branch.

Linting and code style

The project uses Kotlin's default coding conventions and includes the .idea/codeStyle directory in source control. The project also runs ktlint as part of the CI process to ensure code consistency.

You may run ktlint locally using the following command:

./gradlew ktlint

Some simpler violations can be automatically formatted by ktlint using the following command:

./gradlew ktlintFormat

Licensing

This project is licensed under the Apache 2.0. For more details, please see LICENSE.

ble-starter-android's People

Contributors

cheeyi 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.