Coder Social home page Coder Social logo

asuh5 / unity-android-bluetooth-low-energy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from velorexe/unity-android-bluetooth-low-energy

0.0 0.0 0.0 458 KB

A Unity Android plugin to support basic Bluetooth Low Energy interactions.

C# 100.00%

unity-android-bluetooth-low-energy's Introduction

Unity Android Bluetooth Low Energy

A Unity Android plugin to support basic Bluetooth Low Energy interactions
Basis for my thesis on applying wearables to Virtual Reality Rehabilitation Programs in Android Virtual Reality devices

Features

Support for basic BLE operations

  • Discovering Devices
  • Connecting to a Device
  • Writing to a Characteristic
  • Subscribing to a Characteristic

How It Works

By Utilizing the Android JNI and the capabilities for Android plugins on Unity to interact with the MonoBehaviour ecosystem, the .NET side inside Unity can communicate with the plugin, while the plugin can communicate back using the MonoBehaviour SendMessage method. The plugin contains a Singleton pattern that gets called from the BleManager script as an AndroidJavaObject. With this object you can call static methods and pass parameters, which takes care of communication from Unity to Android's BLE system. The plugin will then operate and send changes to Unity using the MonoBehaviour SendMessage method to pass JSON information to the BleAdapter.

Most of the BLE operations utilize the .NET event system, so information can be passed through all of the classes that need it. The BLE operations rely on the abstract BleCommand class. This class can be queued up into the BleManager, which executes the queued up commands one by one, or removes them from the queue if they're extending their TimeOut time.

Contact

If you need any information, have questions about the project or found any bugs in this project, please create a new Issue and I'll take a look at it! If you've got more pressing questions or questions that aren't related to create an Issue for, you can contact with the methods below.

unity-android-bluetooth-low-energy's People

Contributors

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