Minor fixes, linting and documentation updates.

This commit is contained in:
Kevin Dewald
2025-02-20 12:41:58 -08:00
parent 90b9cee953
commit 7c91280c04
5 changed files with 14 additions and 18 deletions

View File

@@ -13,12 +13,10 @@ The format is based on `Keep a Changelog`_, and this project adheres to `Semanti
- (Android) Implemented the following API functions:
- `Adapter::scan_get_results()`
- `Adapter::get_paired_peripherals()`
- `Peripheral::address_type()`
- `Peripheral::rssi()`
- `Peripheral::tx_power()`
- `Peripheral::is_connectable()`
- `Peripheral::is_paired()`
- `Peripheral::unpair()`
- `Peripheral::manufacturer_data()`
- `Peripheral::advertised_services()`
@@ -29,6 +27,8 @@ The format is based on `Keep a Changelog`_, and this project adheres to `Semanti
**Fixed**
- (Android) Some potential race conditions in the Android backend.
- (Android) Fixed handling of null objects.
- (Android) `Peripheral::address_type()` and `Peripheral::unpair()` had to be removed due to API level limitations.
[0.9.0] - 2025-01-20

View File

@@ -83,6 +83,8 @@ Android
* **Notes:**
- Older APIs are missing certain features of the JVM API that are required by SimpleBLE
- Removing bonds is not supported, as the public API does not provide a way to do this and some work is required to make it work using non-public APIs.
- Address type is not supported, as this is only available on API 35 and newer.
.. Links

View File

@@ -7,14 +7,9 @@ More information will be made available here soon.
**What platforms are supported by SimpleBLE?**
SimpleBLE supports Windows 10+, Linux (Ubuntu 20.04+ and other distros using Bluez),
MacOS 10.15+ (Catalina and newer), iOS 15.0+, and Android API 31+ (Alpha).
MacOS 10.15+ (Catalina and newer), iOS 15.0+, and Android API 31+.
Some platform-specific limitations to note:
- Windows and MacOS only support a single Bluetooth adapter
- WSL does not support Bluetooth
- MacOS versions 12.0-12.2 have scanning issues
- iOS support for versions below 15.0 is untested
- Android support is currently in Release Candidate stage
Please check the overview page on more information about platform-specific limitations.
**Why do I get UUIDs for the peripheral address on MacOS?**

View File

@@ -1,7 +1,7 @@
#include <gtest/gtest.h>
#include "simpleble/SimpleBLE.h"
#include <thread>
#include <chrono>
#include <thread>
#include "simpleble/SimpleBLE.h"
TEST(BLESanityTest, FullSequentialTest) {
// Initialize adapter
@@ -12,7 +12,7 @@ TEST(BLESanityTest, FullSequentialTest) {
// Scan for device
SimpleBLE::Peripheral target_peripheral;
const std::string TARGET_MAC = "11:22:33:44:55:66"; // Replace with your device's MAC
const std::string TARGET_MAC = "11:22:33:44:55:66"; // Replace with your device's MAC
const std::string TARGET_NAME = "SimpleBLE DUT";
bool device_found = false;

View File

@@ -21,7 +21,9 @@ class Object {
Object(jobject obj) : _obj(obj) {
JNIEnv* env = VM::env();
_cls = env->GetObjectClass(obj);
if (obj != nullptr) {
_cls = env->GetObjectClass(obj);
}
}
Object(jobject obj, jclass cls) : _obj(obj), _cls(cls) {}
@@ -39,8 +41,7 @@ class Object {
Object call_object_method(jmethodID method, Args&&... args) {
JNIEnv* env = VM::env();
jobject result = env->CallObjectMethod(_obj.get(), method, std::forward<Args>(args)...);
jclass resultClass = env->GetObjectClass(result);
return Object(result, resultClass);
return Object(result);
}
template <typename... Args>
@@ -103,9 +104,7 @@ class Object {
jmethodID method = env->GetMethodID(_cls.get(), name, signature);
jobject result = env->CallObjectMethod(_obj.get(), method, std::forward<Args>(args)...);
jclass resultClass = env->GetObjectClass(result);
return Object(result, resultClass);
return Object(result);
}
template <typename... Args>