All Questions
Tagged with android-ble kotlin
10
questions
4
votes
2
answers
5k
views
Sending Large File via BLE API on android
I have created BLE sender class for the sending large ByteArray via Bluetooth LE
The logic of the send process following:
Write descriptor to enable notification on characteristics that sends data ...
3
votes
1
answer
2k
views
BLE Advertise data size limit
On My Addroid app I'm trying to add some extra data when I try to start ble advertising, and as I've read, advertise data must be <= 31 bytes.
That's how I do it:
var testData = "abcdefghij"
var ...
1
vote
1
answer
1k
views
Ble Android Advertising: AddServiceData
on my ble project i'm trying to add some service data to advertise data like this
var data = AdvertiseData.Builder().apply {
setIncludeDeviceName(true)
addServiceData(
...
1
vote
1
answer
2k
views
How do I format a byte array to be sent to a characteristic on a BLE device?
I connect to my device and attempt to write to its characteristic:
scanSubscription = rxBleClient.scanBleDevices(
ScanSettings.Builder()
// .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY) // ...
1
vote
2
answers
2k
views
writeDescriptor(BluetoothGattDescriptor!): Boolean' is deprecated. Deprecated in Java
I am working Bluetooth gatt with
minSdk 21
targetSdk 33
I see the writeDescriptor is deprecated in sdk 33. So I did this to wrap the code in SDK version check
gatt.setCharacteristicNotification(...
1
vote
1
answer
126
views
How to Bluetooth LE background connection?
Sorry for my bad English.
Context
My main goal is to build a electronic lock, the key would be a phone connected in BLE. The proximity of the phone must unlock the lock.
What I want to do
A ...
0
votes
1
answer
753
views
How can I write to a BLE GATT characteristic using RxAndroidBle in Kotlin?
I am unable to use the sample code to write to a GATT characteristic over BLE. I'm using the following code from Polidea's examples available here: https://github.com/Polidea/RxAndroidBle
Code:
...
0
votes
1
answer
241
views
How to scan BLE devices that use Extended Advertisement and Coded PHY with Android?
I try do create an Android app that scan Bluetooth Low Energy devices that advertise using Extended Advertisement and use Coded PHY for advertisement.
I have a nrf52840 peripheral that I have setup to ...
0
votes
1
answer
799
views
Get BLE devices in Kotlin
I've got my SettingsActivity allowing the user to choose form a list of paired Bluetooth devices.
However, there seems to be something strange going on with Bluetooth Low Energy where devices don't ...
0
votes
0
answers
72
views
Write to device characteristic in order to "authenticate", Kotlin
I'm very new to RxAndroidBle and RxJava or RxKotlin.
I have a task somehow similar to this one, How to receive all notifications in RxAndroidBle
I need to wirte to a characteristic in order to "...