Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [android-bluetooth]

The Android bluetooth subsystem. May also refer to using bluetooth hardware in Android.

android-bluetooth
1,108 questions with no upvoted or accepted answers
19 votes
0 answers
3k views

How to reliably fetch and detect changes to the active audio route on Android?

I have a feature where I need to fetch current AND detect switch of the active audio output device of the system. Something like: run app -> fetch current device (which might be embedded speakers) ...
getacoafeza's user avatar
14 votes
1 answer
3k views

Android Companion device pairing: how to use REQUEST_COMPANION_RUN_IN_BACKGROUND permission?

I'm currently testing Android companion device pairing and I'm not sure how to benefit from the REQUEST_COMPANION_RUN_IN_BACKGROUND permission. In one part of Google documentation is says: After the ...
Jan Slominski's user avatar
10 votes
0 answers
3k views

BluetoothGattCallback never happening? Status = 0?

UPDATE: Question is irrelevant. Careful debugging showed that it was reaching the connection state change. I just need to learn more of the tools built into android-studio. Reading the GATT ...
Kevin Elkins's user avatar
9 votes
0 answers
4k views

Check if user has granted access to nearby device permission

I am reading the documentation here for the Android Nearby Permission specially for Android 12. I want to check if the user has granted access to Nearby device permission programmatically. The ...
luckysing_noobster's user avatar
9 votes
0 answers
1k views

TextToSpeech audio routed to phone speaker instead of bluetooth headset

I have an app that uses android.speech.tts.TextToSpeech.speak() to readout messages. The messages are only supposed to be readout to a connected bluetooth headset. So before I call the speak method ...
noev's user avatar
  • 980
9 votes
0 answers
7k views

How can I enable the new Bluetooth A2DP Sink feature introduced in Lollipop?

I am attempting to modify the AOSP android image for Nexus 5 to include support for Bluetooth A2DP Sink. I've found that Google was nice enough to include a hidden build target for the Nexus 5. ...
andromation's user avatar
9 votes
1 answer
8k views

ANDROID: Is it possible to talk with a bluetooth headset like a walkie talkie?

Is it possible to write an Android application that let me use a paired bluetooth headset like a walkie talkie? So I can talk on the phone's mic and another person can listen from the headset and he ...
lorenzop's user avatar
  • 580
8 votes
0 answers
3k views

How to change Android 12 "neverForLocation" BLUETOOTH_SCAN permission flag at runtime

I am working on a Android application that uses bluetooth and I want to use the new Android 12 Bluetooth_SCAN and CONNECT permissions to remove the need for location permission using <uses-...
Ionut's user avatar
  • 869
8 votes
0 answers
3k views

Device Bluetooth address in Oreo (8.1)

I need to obtain device's Bluetooth MAC address. Before Android 6 it was easy as BluetoothAdapter.getDefaultAdapter().getAddress(). After that we had to use a simple workaround: String macAddress = ...
Vladyslav Matviienko's user avatar
8 votes
0 answers
1k views

Android BLE device scan with device name filter is not working

I am using device name filter to connect to a specific BLE device. But my scan call back is not executing. It works fine when I use MAC address as filter. Is this a known issue or bug? I am testing on ...
sa_penguin's user avatar
8 votes
0 answers
1k views

Which way is better for reconnecting to BLE device? Use `autoConnect=true` or perform repetitive scan?

I have a BLE device which follows next forkflow: sleep until button (on device) is pressed -> Wake up and advertise for 60 seconds -> Wait until the phone ask for data -> send data -> close connection ...
MyDogTom's user avatar
  • 4,556
8 votes
0 answers
500 views

Transferring call from source Android phone to sink-audio development kit using Bluetooth?

I am trying to make an app in which I can transfer my call from Android phone (the source) to audio development kit (CSR 8670 Development-Kit as sink). I am able to transfer audio through A2DP profile ...
Rajat kumar's user avatar
7 votes
0 answers
1k views

Unpairing paired Bluetooth Device using reflection and calling "removeBond" method not working

I am using removeBond method from BluetoothDevice class to unpair the device since a long time. But in most of the xiaomi devices, this is not working. Check below code I am using: Set&...
Vishal Sharma's user avatar
7 votes
1 answer
871 views

Bluetooth 3.0 HS support in Android

I did not find any information about Bluetooth 3.0 HS support in Android. Is there any API for that? Is it supported at all? I have an Android-based (4.1.2 with BlueZ stack) device with hardware ...
BoredT's user avatar
  • 1,590
7 votes
0 answers
1k views

Android BLE device receives results extremely irregularly

My beacon (SensorTag CC2541) is an advertiser broadcasting its information 10 times a second. My Android app scans with a BluetoothLeScanner. Mostly the time between each scan result registered by my ...
user avatar

15 30 50 per page
1
2 3 4 5
74