Comments (1)
I am new to async and promises, even though the function BLEManager.state didn't look like it was async from the source, it is and required this code to read it.
componentWillMount() {
this.manager.state().then((newState) => {
console.log("Current state: " + newState);
});
}
Also the onStateChange callback doesn't fire initially, so you have to actually change the state of the Bluetooth to get a response.
Adding this comment in case anyone sees it.
from react-native-ble-plx.
Related Issues (20)
- π device.manufacturerData is undefined, however device.rawScanRecord has valid manufacturerData data. HOT 10
- [Android 14] startDeviceScan can Not find the ble device after it is disconnected HOT 1
- Question: omitting a line from AndroidManifest.xml HOT 2
- π Attempt to invoke interface method 'void com.bleplx.adapter.BleAdapter.stopDeviceScan()' on a null object reference HOT 6
- π Attempt to invoke virtual method 'java.lang.String com.bleplx.adapter.Service.getDeviceID()' on a null object reference HOT 4
- π com.bleplx.adapter.BleModule.cleanServicesAndCharacteristicsForDevice outOfBounds HOT 1
- Write failed for device: errorCode: 401 attErrorCode: 128 HOT 1
- The invocation of setState within the startDeviceScan callback results in undesirable behavior on iOS devicesπ HOT 1
- π device.manufacturerData is undefined in iOS HOT 3
- π Getting null in serviceUUID and servicedata in device.discoverAllServicesAndCharacteristics() HOT 9
- π startDeviceScan UUIDs array not fully working on Android HOT 1
- Android build failed: error: cannot find symbol, symbol: variable S HOT 3
- π JSON value '( 65, 84, 90, 13 )' of type NSMutableArray cannot be converted to NSString HOT 1
- π Subscription returned from monitorCharacteristicForService can't be removed for Android
- Cannot scan Eddystone service UUID on Android with versions > 2.0.3 HOT 10
- π BLE Scanner Device not found on Android 13 HOT 1
- [Android] After migration from 2.0.3 to 3.1.2 device disconnect after 5 second. HOT 17
- Cannot scan for devices (With error message) HOT 1
- App crash on start NullPointerException "com.bleplx.adapter.BleAdapter.stopDeviceScan()"π
- π OnDisconnected() never reporting error HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-ble-plx.