polidea / blemulator_flutter Goto Github PK
View Code? Open in Web Editor NEWBLEmulator Flutter: the Flutter BLE peripheral simulator
License: Other
BLEmulator Flutter: the Flutter BLE peripheral simulator
License: Other
Old version of the example app contains ManualTestView
which should be available on the peripheral details screen's 3rd tab if peripheral is a SensorTag
.
It needs to be decided if already existing view should be used with some minor adjustments or if it should be written from scratch.
Since BleAdapter
serves as a BLE layer access point for blocs it needs to be adjusted for the needs of peripheral details blocs.
Scope of this task can be defined when #53 is completed.
Right now the only way to create a peripheral that is not advertised is to override onScan()
. This should be easier to do.
Add isAdvertising
property visible to the user.
Currently JSON parsing is implemented without error handling in the native iOS part of the plugin. Whenever error occurs, it does so silently and application resumes with invalid parsing results.
Hey,
just wondering if this can only be used in Flutter Integration Tests (Flutter Driver) or also in Widget and Unit Tests?
Best,
Niklas
Change the UI of the scanned devices row views on the main screen of the example app.
Add:
Goals of this issue:
SensorTag
- tabbed layout containing 3 tabs:SensorTag
- single view identical to details view for SensorTag
peripheralsNavigotionBloc was introduced as a part of another feature and it was decided to write unit tests for it in a separate issue.
Change the implementation of scanning methods in BleAdapter in a way that starting/stopping scan process is triggered by subscribing/cancelling subscription on a Stream controlled by the adapter.
The goal is to have appropriate repository for peripheral details operations - decision is needed whether is's going to be the same as for peripheral list or a new one dedicated to detail functionalities.
Currently, whenever startPeripheralScan
method is called on BleAdapter
, existing _scanEventsSubscription
is canceled.
It needs to be analyzed if this should be the final solution or should it be changed in a way that multiple subscriptions are supported at the same time or should it be handled in a yet different way.
It needs to be analyzed if currently used icons on start/stop scanning buttons are representative enough for the actions they perform from UX perspective.
There were some concerns raised that they might suggest more Bluetooth status rather than scanning status.
It looks like v2.3.1 of flutter_ble_lib, release today, is incompatible with the current version of blemulator.
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "MultiplatformBleAdapter":
In snapshot (Podfile.lock):
MultiplatformBleAdapter (= 0.1.6, ~> 0.1.5, ~> 0.1.6)
In Podfile:
blemulator (from `.symlinks/plugins/blemulator/ios`) was resolved to 1.1.2, which depends on
MultiplatformBleAdapter (~> 0.1.5)
flutter_ble_lib (from `.symlinks/plugins/flutter_ble_lib/ios`) was resolved to 2.3.1, which depends on
MultiplatformBleAdapter (~> 0.1.7)
Specs satisfying the `MultiplatformBleAdapter (= 0.1.6, ~> 0.1.5, ~> 0.1.6), MultiplatformBleAdapter (~> 0.1.5), MultiplatformBleAdapter (~> 0.1.7)` dependency were found, but they required a higher minimum deployment target.
Hi, thanks for the fantastic libs!
On the MacOS FlutterBleLIb currently throws an exception about missing plugin, even if's used with BleEmulator. Would it be possible to be able to use BleEmulator on the platforms without bluetooth plugin implemented (like MacOS or others)?
That would be really helpful and allow to work on UI/login of the app even without real devices or hardware bluetooth stack working.
Thanks in advance for any comments or thoughts on this.
Each discovered characteristic's row should offer set of controls to read/write/monitor itself based on its definition.
Not much details on this task yet, needs some analysis on how to implement it first.
It is required to ask user for relevant permissions to use BLE functionality. This is an Android version of this task.
The goal is to create a bloc dedicated for peripheral details screen.
First section on the main tab should contain mtu view, which should display mtu value and a button to negotiate mtu.
When creating a SimulatedService
or SimulatedCharacteristic
with an upper case uuid, they are not found when using the uuids returned during discovery.
Example:
Using the SensorTag SimulatedPeripheral
with upper case uuids
await peripheral.discoverAllServicesAndCharacteristics();
List<Service> services = await peripheral.services();
for (Service service in services) {
print('Service: ${service.uuid}');
List<Characteristic> characteristics = await peripheral.characteristics(service.uuid);
for (Characteristic characteristic in characteristics) {
print(' Characteristic: ${characteristic.uuid}');
}
}
Prints only
Service: f000aa00-0451-4000-b000-000000000000
Using the workaround service.uuid.toUpperCase()
List<Characteristic> characteristics = await peripheral.characteristics(service.uuid.toUpperCase());
Prints:
Service: f000aa00-0451-4000-b000-000000000000
Characteristic: f000aa01-0451-4000-b000-000000000000
Characteristic: f000aa02-0451-4000-b000-000000000000
Characteristic: f000aa03-0451-4000-b000-000000000000
The same is true when reading characteristic values:
peripheral.readCharacteristic(service.uuid.toUpperCase(), characteristic.uuid);
which throws the exception:
SimulatedBleError({"errorCode":404,"reason":"Characteristic f000aa01-0451-4000-b000-000000000000 not found"})
Tested on Android Emulator API29.
Right now you have to add all the simulated peripherals before calling startPeripheralScan()
. If you do it later, it won't show up in scan results. My workaround for this is to stop scan and start it again.
I think it should be possible to add simulated peripherals at any time and BLE Manager should be able to see as they appear while scanning.
Currently when PeripheralListBloc
requests start of scanning, it provides BleAdapter
with scan event handler which translates ScanResult
into BlePeripheral
and adds NewPeripheralScan
event to the bloc's sink so it can be in turn handled via mapEventToState
method.
It needs to be decided if implementation
should be changed, so BleAdapter
s ScanResult
handler does not have to emit the event to the bloc, but emits the state immediately instead.
I'm trying to write a driver test with simulated device, that checks connection state presented in app UI when the BLE connection is lost. I've not found API in blemulator to disconnect and remove the simulated device.
Despite the fact I found a workaround for this I'd like to see official API for removing simulated devices.
Right now I just call onDisconnect
on the simulated device and return false
from onConnectRequest
. I think removing the device from blemulator would be much better solution.
Decide if connect/disconnect controls should be added to the peripheral rows on peripheral list screen.
FlutterBleLib supports Android X, but blemulator_flutter doesn't support Flutter apps migrated to AndroidX.
Plugin uses org.jetbrains.kotlin:kotlin-gradle-plugin: 1.2.71
. Error from build:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher. The following dependencies do not satisfy the required version: project ':blemulator' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71
Changing the version to 1.3.0 causes AndroidX support errors.
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:3: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
^
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartValueHandler.java:3: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
^
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/BlemulatorPlugin.java:4: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
^
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartValueHandler.java:55: error: cannot find symbol
public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) {
^
symbol: class NonNull
location: class DartValueHandler
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartValueHandler.java:55: error: cannot find symbol
public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) {
^
symbol: class NonNull
location: class DartValueHandler
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/BlemulatorPlugin.java:37: error: cannot find symbol
public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) {
^
symbol: class NonNull
location: class BlemulatorPlugin
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/BlemulatorPlugin.java:37: error: cannot find symbol
public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) {
^
symbol: class NonNull
location: class BlemulatorPlugin
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:45: error: cannot find symbol
public void success(@Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:50: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:50: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:66: error: cannot find symbol
public void success(@Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:71: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:71: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:88: error: cannot find symbol
public void success(@Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:93: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:93: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:109: error: cannot find symbol
public void success(@Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:114: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:114: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:134: error: cannot find symbol
public void success(@Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:140: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:140: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:159: error: cannot find symbol
public void success(@Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:165: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:165: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:185: error: cannot find symbol
public void success(@Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:191: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:191: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:213: error: cannot find symbol
public void success(@Nullable Object discoveryResponse) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:218: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:218: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:269: error: cannot find symbol
public void success(@Nullable Object characteristicJsonObject) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:274: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:274: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:300: error: cannot find symbol
public void success(@Nullable Object characteristicJsonObject) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:305: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:305: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:329: error: cannot find symbol
public void success(@Nullable Object characteristicJsonObject) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:334: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:334: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:364: error: cannot find symbol
public void success(@Nullable Object characteristicJsonObject) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:369: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:369: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:397: error: cannot find symbol
public void success(@Nullable Object characteristicJsonObject) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:402: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:402: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:428: error: cannot find symbol
public void success(@Nullable Object characteristicJsonObject) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:433: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:433: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:460: error: cannot find symbol
public void success(@Nullable Object characteristicJsonObject) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:465: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:465: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:490: error: cannot find symbol
public void success(@Nullable Object characteristicJsonObject) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:495: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:495: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:518: error: cannot find symbol
public void success(@Nullable Object characteristicJsonObject) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:523: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:523: error: cannot find symbol
public void error(String errorCode, @Nullable String jsonBody, @Nullable Object irrelevant) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:541: error: cannot find symbol
public void success(@Nullable Object rssi) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:550: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:550: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:571: error: cannot find symbol
public void success(@Nullable Object mtu) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:580: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:580: error: cannot find symbol
public void error(String s, @Nullable String s1, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:599: error: cannot find symbol
public void success(@Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:606: error: cannot find symbol
public void error(String s, @Nullable String jsonBody, @Nullable Object o) {
^
symbol: class Nullable
/Users/gurgenhovhannisyan/work/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/blemulator-1.0.0-dev.3/android/src/main/java/com/polidea/blemulator/bridging/DartMethodCaller.java:606: error: cannot find symbol
public void error(String s, @Nullable String jsonBody, @Nullable Object o) {
^
symbol: class Nullable
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
67 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':blemulator:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Main tab of peripheral details screen should contain the list of services (once they are discovered).
To implement bloc for peripheral details using flutter_bloc
it is required to define which events are going to be supported for this functionality.
I/SimulatedAdapter(28778): discoverAllServicesAndCharacteristicsForDevice
D/com.polidea.flutter_ble_lib.FlutterBleLibPlugin(28778): on native side observed method: characteristicsForService
I/SimulatedAdapter(28778): discoverAllServicesAndCharacteristicsForDevice
E/MethodChannel#flutter_ble_lib(28778): Failed to handle method call
E/MethodChannel#flutter_ble_lib(28778): java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object[] java.util.List.toArray(java.lang.Object[])' on a null object reference
E/MethodChannel#flutter_ble_lib(28778): at com.polidea.blemulator.SimulatedAdapter.getCharacteristicsForService(SimulatedAdapter.java:328)
E/MethodChannel#flutter_ble_lib(28778): at com.polidea.flutter_ble_lib.delegate.DiscoveryDelegate.getCharacteristicsForService(DiscoveryDelegate.java:152)
E/MethodChannel#flutter_ble_lib(28778): at com.polidea.flutter_ble_lib.delegate.DiscoveryDelegate.onMethodCall(DiscoveryDelegate.java:72)
E/MethodChannel#flutter_ble_lib(28778): at com.polidea.flutter_ble_lib.FlutterBleLibPlugin.onMethodCall(FlutterBleLibPlugin.java:96)
E/MethodChannel#flutter_ble_lib(28778): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/MethodChannel#flutter_ble_lib(28778): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/MethodChannel#flutter_ble_lib(28778): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
E/MethodChannel#flutter_ble_lib(28778): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_ble_lib(28778): at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#flutter_ble_lib(28778): at android.os.Looper.loop(Looper.java:160)
E/MethodChannel#flutter_ble_lib(28778): at android.app.ActivityThread.main(ActivityThread.java:6863)
E/MethodChannel#flutter_ble_lib(28778): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_ble_lib(28778): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
E/MethodChannel#flutter_ble_lib(28778): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
D/com.polidea.flutter_ble_lib.FlutterBleLibPlugin(28778): on native side observed method: characteristicsForService
I/SimulatedAdapter(28778): discoverAllServicesAndCharacteristicsForDevice
E/MethodChannel#flutter_ble_lib(28778): Failed to handle method call
E/MethodChannel#flutter_ble_lib(28778): java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object[] java.util.List.toArray(java.lang.Object[])' on a null object reference
E/MethodChannel#flutter_ble_lib(28778): at com.polidea.blemulator.SimulatedAdapter.getCharacteristicsForService(SimulatedAdapter.java:328)
E/MethodChannel#flutter_ble_lib(28778): at com.polidea.flutter_ble_lib.delegate.DiscoveryDelegate.getCharacteristicsForService(DiscoveryDelegate.java:152)
E/MethodChannel#flutter_ble_lib(28778): at com.polidea.flutter_ble_lib.delegate.DiscoveryDelegate.onMethodCall(DiscoveryDelegate.java:72)
E/MethodChannel#flutter_ble_lib(28778): at com.polidea.flutter_ble_lib.FlutterBleLibPlugin.onMethodCall(FlutterBleLibPlugin.java:96)
E/MethodChannel#flutter_ble_lib(28778): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/MethodChannel#flutter_ble_lib(28778): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/MethodChannel#flutter_ble_lib(28778): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
E/MethodChannel#flutter_ble_lib(28778): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_ble_lib(28778): at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#flutter_ble_lib(28778): at android.os.Looper.loop(Looper.java:160)
E/MethodChannel#flutter_ble_lib(28778): at android.app.ActivityThread.main(ActivityThread.java:6863)
E/MethodChannel#flutter_ble_lib(28778): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_ble_lib(28778): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
E/MethodChannel#flutter_ble_lib(28778): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I/gioteas.tefori(28778): Waiting for a blocking GC ProfileSaver
I/gioteas.tefori(28778): WaitForGcToComplete blocked ProfileSaver on ProfileSaver for 12.000ms
First section on the main tab should contain rssi view, which should display most recent rssi value and a button to retrieve rssi value on demand.
Currently app's custom colors are defined in util/custom_colors.dart
which is probably not an appropriate place to have it. It should not be placed in a util
package and what is more - it needs to be analyzed if this approach is the good practice used in flutter app theming.
It is required to ask user for relevant permissions to use BLE functionality. This is an iOS version of this task.
When PeripheralListBloc
receives new scan result containing BlePeripheral
, it checks if the list of previously scanned peripherals contains the new one and adds it if needed.
It is also required to update peripheral if it was already added to the list.
The idea is to have connect / disconnect buttons available in the peripheral's properties section with only one available at the time depending on the peripheral's connection state (or on if peripheral isConnectable
).
Buttons mentioned above should call methods to connect to and disconnect from peripheral.
Currently there are dummy ConnectToPeripheral
and DisconnectFromPeripheral
events created for PeripheralListBloc
and dummy logic marked with TODOs in the bloc itself.
It needs to be analyzed if this bloc is an appropriate place for this logic or should it be handled by another class.
Old version of the example app contains AutoTestView
which should be available on the peripheral details screen's 2nd tab if peripheral is a SensorTag
.
It needs to be decided if already existing view should be used with some minor adjustments or if it should be written from scratch.
When I am setting the manufactorData in the scanInfo of a SimulatedPeripheral, the whole app crashes as soon as the scanning is started. This only happens on iOS, on android it works as expected. Here is the ios crash report:
First section on the main tab should contain peripheral properties information like peripheral identifier. It is to be decided if there should be any other information information presented here.
Add Bluetooth state controls (on/off) to the main screen of the example app.
To implement bloc for peripheral details using flutter_bloc it is required to define which states are going to be supported for this functionality.
Same issue as #122
[!] CocoaPods could not find compatible versions for pod "MultiplatformBleAdapter":
In snapshot (Podfile.lock):
MultiplatformBleAdapter (= 0.1.7, ~> 0.1.7)
In Podfile:
blemulator (from `.symlinks/plugins/blemulator/ios`) was resolved to 1.2.1, which depends on
MultiplatformBleAdapter (~> 0.1.7)
flutter_ble_lib (from `.symlinks/plugins/flutter_ble_lib/ios`) was resolved to 2.3.2, which depends on
MultiplatformBleAdapter (~> 0.1.8)
Specs satisfying the `MultiplatformBleAdapter (= 0.1.7, ~> 0.1.7), MultiplatformBleAdapter (~> 0.1.7), MultiplatformBleAdapter (~> 0.1.8)` dependency were found, but they required a higher minimum deployment target.```
Main tab of peripheral details screen's services list should be expandable (whether it should be expanded or collapsed at the start is to be decided).
Expanded service should contain the list of discovered characteristics for that service.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.