All Projects β†’ qiantao94 β†’ RxBle

qiantao94 / RxBle

Licence: other
Android BLE develop with RxJava

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to RxBle

Androidbluetoothlibrary
A Library for easy implementation of Serial Bluetooth Classic and Low Energy on Android. πŸ’™
Stars: ✭ 171 (+402.94%)
Mutual labels:  bluetooth-low-energy
Python Bluezero
A simple Python interface to Bluez
Stars: ✭ 222 (+552.94%)
Mutual labels:  bluetooth-low-energy
bluetooth-terminal
ES6 class for serial communication with your own Bluetooth Low Energy (Smart) devices
Stars: ✭ 43 (+26.47%)
Mutual labels:  bluetooth-low-energy
Continuity
Apple Continuity Protocol Reverse Engineering and Dissector
Stars: ✭ 180 (+429.41%)
Mutual labels:  bluetooth-low-energy
Pandwarf
PandwaRF: RF analysis tool with a sub-1 GHz wireless transceiver controlled by a smartphone or
Stars: ✭ 206 (+505.88%)
Mutual labels:  bluetooth-low-energy
Fruitymesh
FruityMesh - The first completely connection-based open source mesh on top of Bluetooth Low Energy (4.1/5.0 or higher)
Stars: ✭ 229 (+573.53%)
Mutual labels:  bluetooth-low-energy
H Ble
Android Bleη±»εΊ“οΌŒεŸΊδΊŽε›žθ°ƒοΌŒζš΄ιœ²ζœη΄’γ€θΏžζŽ₯、发送、ζŽ₯ζ”Άγ€ζ–­εΌ€θΏžζŽ₯η­‰ζŽ₯ε£οΌŒζ— ιœ€ε…³εΏƒη»†θŠ‚ζ“δ½œε³ε―θΏ›θ‘ŒBleι€šδΏ‘γ€‚
Stars: ✭ 171 (+402.94%)
Mutual labels:  bluetooth-low-energy
ble
Bluetooth Low Energy for Linux / macOS
Stars: ✭ 264 (+676.47%)
Mutual labels:  bluetooth-low-energy
Radareeye
A tool made for specially scanning nearby devices[BLE, Bluetooth & Wifi] and execute our given command on our system when the target device comes in-between range.
Stars: ✭ 218 (+541.18%)
Mutual labels:  bluetooth-low-energy
Bluetooth
Cross-platform Bluetooth API for Go and TinyGo.
Stars: ✭ 246 (+623.53%)
Mutual labels:  bluetooth-low-energy
Kable
Kotlin Asynchronous Bluetooth Low-Energy
Stars: ✭ 194 (+470.59%)
Mutual labels:  bluetooth-low-energy
Rxble
使用 RxJava ε°θ£…ηš„δ½ŽεŠŸθ€—θ“η‰™η±»εΊ“
Stars: ✭ 203 (+497.06%)
Mutual labels:  bluetooth-low-energy
Gatt Python
Bluetooth GATT SDK for Python
Stars: ✭ 233 (+585.29%)
Mutual labels:  bluetooth-low-energy
Homebridge Mi Hygrothermograph
Homebridge plugin for the Xiaomi Mi Bluetooth Temperature and Humidity Sensor
Stars: ✭ 179 (+426.47%)
Mutual labels:  bluetooth-low-energy
py-bluetooth-utils
Python module containing bluetooth utility functions, in particular for easy BLE scanning and advertising
Stars: ✭ 60 (+76.47%)
Mutual labels:  bluetooth-low-energy
Reactivebeacons
Android library scanning BLE beacons nearby with RxJava
Stars: ✭ 171 (+402.94%)
Mutual labels:  bluetooth-low-energy
Opentracks
OpenTracks is a sport tracking application that completely respects your privacy.
Stars: ✭ 225 (+561.76%)
Mutual labels:  bluetooth-low-energy
ESP32 Thing Plus
ESP32 Thing-compatible board using the WROOM module and a QWIIC connector.
Stars: ✭ 18 (-47.06%)
Mutual labels:  bluetooth-low-energy
STBlueMS Android
"ST BLE Sensor" Android application source code.
Stars: ✭ 93 (+173.53%)
Mutual labels:  bluetooth-low-energy
Miband4
Access Xiaomi MiBand 4 from Linux using Bluetooth LE
Stars: ✭ 238 (+600%)
Mutual labels:  bluetooth-low-energy

δΈ­ζ–‡ζ–‡ζ‘£

RxBle

Program Android BLE function with RxJava

SETUP

Make sure your project has been introduced RxJava in build.gradle,like this:

compile 'io.reactivex:rxjava:1.2.3'
compile 'io.reactivex:rxandroid:1.2.1'

And copy RxBle.java to your project.

USEAGE

1.Get the singleton of the RxBle

RxBle rxBle = RxBle.getInstance()

or if you know the target BLE device name such as Test

RxBle rxBle = RxBle.getInstance().setTargetDevice("Test")

2.Open bluetooth by no asking

mRxBle.openBle(this);

3.If you did not use setTargetDevice to set target device name,you should set a listener in RxBle to get a list of devices when scanning,then connect the target device by yourself

rxBle.setScanListener(new RxBle.BleScanListener() {
	@Override
	public void onBleScan(BluetoothDevice bleDevice, int rssi, byte[] scanRecord) {
		// Get list of devices and other information
		if(bledevice.getName().equals("Test")){
			rxBle.connectDevice(bleDevice);
		}
	}
});

4.Communication between Android phone and BLE device

rxBle.sendData(data);
// or send with delay
rxBle.sendData(data,delay);

rxBle.receiveData().subscribe(new Action1<String>() {
	@Override
	public void call(String receiveData) {
		// Data will be received while they sent by BLE device
	}
});

5.Close BLE

rxBle.closeBle();

ADDITIONAL

The best practice is fork and edit it,adapt to your project needs.

FAQ

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].