Questions tagged [android-bluetooth]
The Android bluetooth subsystem. May also refer to using bluetooth hardware in Android.
android-bluetooth
2,167
questions
193
votes
5
answers
102k
views
Android 4.3 Bluetooth Low Energy unstable
I am currently developing an application that will use Bluetooth Low Energy (testing on the Nexus 4). After getting started with the official BLE APIs in Android 4.3, I have noticed that after I ...
98
votes
8
answers
167k
views
How can I programmatically tell if a Bluetooth device is connected?
I understand how to get a list of paired devices, but how can I tell if they are connected?
It must be possible since I see them listed in my phone's Bluetooth device list and it states their ...
91
votes
12
answers
163k
views
Android 12 New Bluetooth Permissions
Bluetooth is the main dependency of our app. So, We already try to implement new Android 12 Bluetooth permissions. Our only resource is Android developers New Bluetooth permissions in Android 12. ...
81
votes
3
answers
53k
views
Can an Android device act as an iBeacon?
Can an Android device act as an iBeacon and figure out when other Android devices come in its range? Do those other Android devices need to have Bluetooth turned on?
If a customer comes into my shop ...
48
votes
2
answers
27k
views
What do I use now that BluetoothAdapter.getDefaultAdapter() is deprecated?
How do I fix the deprecation warning in this code? Alternatively, are there any other options for doing this?
val mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter()
if (...
47
votes
6
answers
45k
views
Communicating between iOS and Android with Bluetooth LE
I've got a working app using CoreBluetooth to communicate between an iPad (central) and iPhone (peripheral). I have one service that has two characteristics. I have a Nexus 7 running the latest ...
44
votes
1
answer
8k
views
'App is scanning too frequently' with ScanSettings.SCAN_MODE_OPPORTUNISTIC
I noticed an issue on Samsung S8, Android 7.0 (upd. This also happens on Android 7.0: Samsung S7, Nexus 5x) which tells (after couple of tests) that app is scanning too frequently:
08-14 12:44:20.693 ...
43
votes
12
answers
96k
views
Bluetooth HCI snoop log not generated
I'm running Android 4.4.2 and I enabled the "Bluetooth HCI snoop log" as described here Sniffing/logging your own Android Bluetooth traffic
After turning bluetooth on and off I rebooted the phone. I ...
41
votes
8
answers
106k
views
How to pair Bluetooth device programmatically Android
I am developing an application where I want to connect a Bluetooth device main issue is I don't want user to enter required pin instead application should do that by himself...I don't have any ...
39
votes
3
answers
805
views
Android: BluetoothSocket receives its own output
I have an app that connects to a RaspberryPi via Bluetooth and loops the same data to it while it receives some data back.
I had some issues with the connection so this workaround is needed to ...
33
votes
2
answers
51k
views
Android BLE, read and write characteristics
I am currently developing Android BLE, and encounters a lot of problems with the Android BLE stacks..
My development tool is Samsung Galaxy J with Android 4.3.
I want to know how can I read a ...
33
votes
4
answers
18k
views
Android 6.0 Marshmallow BLE : Connection Parameters
The Bluetooth Low Energy connection parameters management seems to have changed in Android 6.
I have a BLE Peripheral device who needs to use some specific connection parameters (notably, the ...
32
votes
6
answers
29k
views
Private vs public addresses in Bluetooth low energy on Android
A Bluetooth low energy device is uniquely identified by it's address (in the Android API they call this the MAC address and denote it as colon separated hex values e.g. 11:aa:22:bb:33:cc).
But to ...
30
votes
7
answers
142k
views
Connect multiple devices to one device via Bluetooth
I would like to create a game, where you must connect multiple devices (4+) to a main device (ex. a tablet) via Bluetooth. There would be two apps, a main one to which all data would be send from the ...
29
votes
4
answers
48k
views
Bluetooth LE Scan fails in the background - permissions
The following code works great on my Nexus 9 running Android 5.1.1 (Build LMY48M), but won't work on a Nexus 9 running Android 6.0 (Build MPA44l)
List<ScanFilter> filters = new ArrayList<...