RxBle | a wrapper for RxAndroidBle | Wrapper library
kandi X-RAY | RxBle Summary
kandi X-RAY | RxBle Summary
a wrapper for RxAndroidBle
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Click the view
- Enables bluetooth clients
- Convert a byte array to a hex string
- Reads device address and uuid
- Handles a characteristic
- Connect to a device
- Convert a hex representation to a byte array
- Writes a single characteristic to the device
- Request permission
- Checks if a given context has been granted
- Request dialog
- Handle the descriptor
- Writes descriptor
- Initialize the activity
- Initializes the view
- Refresh connection info
- Adds new connection data to the data set
- Sets the line and description of the connect view
- Describe property properties
- Binds the item at the position of the BindViewHolder at the given position
- Resume resume check
- Initializes this activity
- Generate view holder
- Initialize the tip
- Wrap connection
- Gets the item view type
RxBle Key Features
RxBle Examples and Code Snippets
// 打开log日志
void enableLog(boolean enable);
// 获取RxBleClient
RxBleClient client();
// 构造RxBleOperator
RxBleOperator create();
// 蓝牙是否打开
boolean isEnable();
// 注册蓝牙状态变化
PublishSubject registerState();
// Characteristic 是否支持 read,write,notify,ind
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.JoeSteven:RxBle:latest-version'
}
RxBle.init(Global.context(), new BlePermissionRequester());
public interface PermissionRequester {
void request(PermissionListener listener, String... permissions);
boolean hasPermission(String... permissions);
}
Community Discussions
Trending Discussions on RxBle
QUESTION
Okay, so I'm having some very odd behaviour that doesn't make much sense in my app.
My app uses BLE and I have a static class which I initialize on app launch, this typically works with no issue.
Today I made a single change in my app which was to update this:
...ANSWER
Answered 2020-Feb-21 at 16:14So the issue was the version of the rxandroidble library was incompatible with the new firebase messaging.
When I updated from
implementation 'com.polidea.rxandroidble:rxandroidble:1.4.3'
to
implementation 'com.polidea.rxandroidble:rxandroidble:1.7.1'
the crash stopped.
QUESTION
I working on transfering files from smartphone to peripheral device over BLE.
Sending data over BLE is slow (data transfer is being implemented using overwriting one 20 bytes long characterisc). Slow speed is not a problem, because the size of files is really small also (up to 1MB).
In trivial tests everything works good. As long as I try to run file transfer automatically in a loop (e.g. leave it running over night jsut for test purposes), on device with Bluetooth standard 4.2 after short time Android is spamming following content into Logcat :
...ANSWER
Answered 2020-Feb-05 at 15:53from Android api level 21 onwards you have the ability to request a larger MTU size from the peripheral device you are sending to as mentioned here. This will allow you to send up to a packet of 517 bytes and this makes your transfer relatively faster than sending oackets of 20 bytes. However this is possible only if your ble device supports a larger MTU size. If you plan to do firmware updates I would suggest both your peripheral device and the smart phone app should use a proper firmware update protocol and that may also depend on the manufacturer of the bluetooth chip used on your peripheral device. Hope this helps.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install RxBle
You can use RxBle like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the RxBle component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page