Comments (6)
@jkh675 you have a build issue. the JS is not finding java class com.nativescript.bluetooth.Bluetooth
. You can try a clean build. Also are you using native--api-usage.json?
from ble.
thanks for your reply! I've tried clean build and I have also tried to update all packages to the newest version, but the problem was not solved instead, when the write function called it didn't show up any message, it just crashed, without any information.
here is the log
JS: CONSOLE INFO: NativescriptBle: startNotifying {"characteristicUUID":"0739","serviceUUID":"1b2c","peripheralUUID":"B0:B2:1C:A7:F6:0A"}
JS: CONSOLE INFO: NativescriptBle: startNotifying ---- peripheralUUID:B0:B2:1C:A7:F6:0A serviceUUID:1b2c characteristicUUID:0739
JS: CONSOLE INFO: NativescriptBle: TNS_BluetoothGattCallback.onDescriptorWrite ---- gatt: android.bluetooth.BluetoothGatt@6d7b00d, descriptor: android.bluetooth.BluetoothGattDescriptor@52f0594, status: 0
JS: CONSOLE INFO: NativescriptBle: TNS_BluetoothGattCallback.onCharacteristicChanged ---- gatt: android.bluetooth.BluetoothGatt@6d7b00d, characteristic: android.bluetooth.BluetoothGattCharacteristic@9e3d01, device: B0:B2:1C:A7:F6:0A
JS: CONSOLE INFO: NativescriptBle: write {"characteristicUUID":"0739","serviceUUID":"1b2c","peripheralUUID":"B0:B2:1C:A7:F6:0A","value":["1"]}
JS: CONSOLE INFO: NativescriptBle: actual write ---- peripheralUUID:B0:B2:1C:A7:F6:0A serviceUUID:1b2c characteristicUUID:0739
from ble.
@jkh675 if there is a crash it will appear in thé logcat
from ble.
nope it just crash, no any informations
from ble.
@jkh675 then it is hard to help you. Might be related to the data you are trying to write
from ble.
@jkh675 In the past, I think I had similar problems when my device specified characteristic was not writable.
Also, make sure to add encoding
property to write. I set it to utf-8
.
from ble.
Related Issues (20)
- bluetooth.connect with autoDiscoverAll hangs on iOS for BT Assigned Numbers HOT 5
- demo-ng - update to latest nativescript and angular HOT 2
- Android - Characteristics Read, Write and Discover not working HOT 1
- service_not_found HOT 3
- Android issue with readCharacteristic call
- error_function_call HOT 6
- (android) startScanning unhandled rejection if user denies location permissions
- (Android) enableGPS does not attempt to enable GPS due to incorrect isGPSEnabled check HOT 1
- (iOS) startScanning() not working HOT 2
- TypeError: Cannot read properties of undefined (reading 'toLowerCase') HOT 6
- sdk 33 , permission BLUETOOTH_SCAN on startScanning HOT 1
- Can't read GATT characteristic on Android SDK 33 HOT 1
- (android) App crash on write HOT 2
- scanning does nothing and does not stop after specified time HOT 5
- Filtering for manufacturerId does not work when scanning HOT 1
- (Android) Function enable throws error on Android 13 HOT 1
- Scan throws error on android 13+ HOT 3
- Issue running the Bluetooth plugin inside my worker HOT 3
- Passkey support 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 ble.