Git Product home page Git Product logo

nordicsemiconductor / android-nrf-toolbox Goto Github PK

View Code? Open in Web Editor NEW
1.1K 102.0 460.0 12.74 MB

The nRF Toolbox is a container app that stores your Nordic Semiconductor apps for Bluetooth Low Energy in one location.

Home Page: https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Toolbox

License: BSD 3-Clause "New" or "Revised" License

Ruby 0.36% Kotlin 98.54% Java 1.10%

android-nrf-toolbox's Introduction

nRF Toolbox

The nRF Toolbox is a container app that stores your Nordic Semiconductor apps for Bluetooth Low Energy in one location.

It contains applications demonstrating standard Bluetooth LE profiles:

  • Cycling Speed and Cadence,
  • Running Speed and Cadence,
  • Heart Rate Monitor,
  • Blood Pressure Monitor,
  • Health Thermometer Monitor,
  • Glucose Monitor,
  • Continuous Glucose Monitor,
  • Proximity Monitor

Since version 1.10.0 the nRF Toolbox also supports the Nordic UART Service which may be used for bidirectional text communication between devices.

How to import to Android Studio

The production version of nRF Toolbox depends on Kotlin BLE Library and demonstrates use of the Android BLE Common Library, which contains utility classes used by apps developed by Nordic Semiconductor.

You may also include the BLE Library and BLE Common Library as modules. Clone the library project to the same root folder.

If you prefer a different name for BLE library, update the settings.gradle file.

If you get "Missing Feature Watch" error, switch the configuration to 'app'.

BleManager and how to use it

There are 2 different solutions how to use the manager shown in different profiles. The very basic approach is used by the BPS nd GLS profiles. Each of those activities holds a static reference to the manager. Keeping the manager as a view model object protects from disposing it when device orientation changes and the activities are being destroyed and recreated. However, this approach does not allow to keep the connections in background mode and therefore is not a solution that should be used in any production-ready application.

A better implementation may be found in CGMS, CSC, HRS, HTS, PRX, RSCS, UART. The BleManager instance is maintained by the running service. The service is started in order to connect to a device and stopped when user decides to disconnect from it. When an activity is destroyed it unbinds from the service, but the service is still running, so the incoming data may continue to be handled. All device-related data are kept by the service and may be obtained by a activity when it binds to it in order to be shown to the user.

Nordic UART Service

The UART profile allows for fast prototyping of devices. The service itself is very simple, having just 2 characteristics, one for sending data and one for receiving. The data may be any byte array but it is very often used with just text. Each UART configuration can be created as a separate profile. Each of them, when pressed, will send the stored command to the device. You may export your configuration to XML and share between other devices. Swipe the screen to right to show the log with all events.

Device Firmware Update

DFU is now available as a separate application https://github.com/NordicSemiconductor/Android-DFU-Library

Dependencies

nRF Toolbox depends on Kotlin BLE Library which may to be cloned into the same root folder as this app. If you prefer a different name, update the settings.gradle file.

The nRF Toolbox also uses the nRF Logger API library which may be found here: https://github.com/NordicSemiconductor/nRF-Logger-API. The library is included in dependencies in build.gradle file. This library allows the app to create log entries in the nRF Logger application. Please, read the library documentation on GitHub for more information about the usage and permissions.

The graph in HRM profile is created using the MPAndroidChart v3.1.0 contribution based on the Apache 2.0 license.

Note

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.