Questions tagged [bluetoothadapter]

The BluetoothAdapter lets you perform fundamental Bluetooth tasks, such as initiate device discovery, query a list of paired devices, etc.

25 questions
4
votes
0 answers

BluetoothAdapter.getName() returns "QCOM-BTD" instead of its set bluetooth name

My Unity app was required to get Bluetooth names to distinguish different phones in the same local network. Here is the code that I used to get Bluetooth name: AndroidJavaClass blueToothAdapter = new…
2
votes
1 answer

BluetoothAdapter StartDiscovery does not work in Foreground Service

My application starts a service that detects phone shaking. When the service detects a shake, it searches for a BT device within range and if a suitable device is found, it connects to it and sends data to it. To check if the system is killing the…
tomaszq120
  • 41
  • 4
2
votes
0 answers

AndroidStudio : List Paired Devices

I'm currently making an app in Android Studio that should communicate with the HC06 Bluetooth Module. I've started with a code I found online here : http://android-er.blogspot.com/2015/10/android-communicate-with-arduino-hc-06.html It works but I'm…
1
vote
0 answers

Bluetooth discovery issue in Android versions above 12

I am programming a very simple test Android application that makes a discovery of bluetooth devices and displays them on screen. This application works correctly on Android 9, but does not work correctly on Android 12. I have no problems requesting…
1
vote
0 answers

What are the differences between the 4 ways to connect a Bluetooth device in Android after scanning?

I found 4 different ways to connect the Bluetooth device in Android after the scanning: createBond -> mBluetoothAdapter.getProfileProxy(this, new InputDeviceServiceListener(),BluetoothProfile.INPUT_DEVICE) -> BluetoothInputDevice.connect createBond…
1
vote
0 answers

Lag when using Bluetooth Adapter in Android Studio

My project: Controlling 3 stepper motors with bluetooth. I'm using Android Studio for the app and Arduino to receive the bluetooth data and control the Steppers. My Problem When my Arduino receives the data it lags or misses some of the data. Here…
1
vote
1 answer

Why is android.bluetooth.BluetoothAdapter#listenUsingL2capOn(int) not accessible?

This might be a newbie question since my experience with Android is limited but for some reason I'm unable to access the method android.bluetooth.BluetoothAdapter#listenUsingL2capOn(int). It seems to be public and hence not really sure why the…
0
votes
0 answers

How to start bluetooth device discovery using companion device pairing?

I am trying to build a sub-module for an app which requires to identify the nearby bluetooth devices and display the discovered devices to the users. I came to know that in order to use the traditional bluetooth adapter and perform a device…
0
votes
0 answers

What does the # mean in a Java function call e.g. BluetoothManager#getAdapter()

I was reviewing some Android documentation and came across the use of a '#' symbol used in what seems to be in place of a '.' for a function call, specifically here, where there is mention of calling BluetoothManager#getAdapter(). What does the #…
Dave
  • 9
0
votes
0 answers

How to switch between the Available/Paired bluetooth device in Android Studio

We all know how to show the paired device list but my question is how we can switch to our preferable bluetooth headset from the list. I only want this option for mobile to headset. Can anybody kindly give me some solution in this problem? I have…
0
votes
1 answer

Does the bluetooth address of Android device changes after some time?

I am asking this question because I want to create an application which stores the data of the user according to the Bluetooth address of their phones. We can share his profile according to that Bluetooth address using Bluetooth. Some people are…
0
votes
0 answers

getUUIDS returns null when device isn't paired

For some strange reason i can't get the uuids of a device i'm getting after a discovery. But if I paire both device before the discovery, then the method getUUIDS doesn't return null. Am I Missing something …
Gaspar gg
  • 116
  • 6
0
votes
1 answer

BluetoothAdapter.getDefaultAdapter() has been deprecated - Flutter

I'm having tough time understanding a small thing. Upon running my code, I'm getting following…
Faizan Kamal
  • 1,732
  • 3
  • 27
  • 56
0
votes
1 answer

Perform a bluetooth scan with BluetoothAdapter in Xamarin.android

I am implementing an APP with Xamarin. I want to perform a Bluetooth scan. And get the device found. Here is my code. How could I implement this to start a scan and collect the result once"Button_Scan()" is triggered? Thank…
0
votes
1 answer

STATE_CONNECTED doesn't mean it's really CONNECTED?

If we have a look at this, it says : Android only supports one connected Bluetooth Headset at a time. Also the explanation of getConnectedDevices() : Return the set of devices which are in state STATE_CONNECTED The return type of the method is…
1
2