Questions tagged [android-bluetooth]
The Android bluetooth subsystem. May also refer to using bluetooth hardware in Android.
android-bluetooth
2,166
questions
0
votes
0
answers
20
views
Android Kotlin ScanFilter Builder class not functioning
As stated above, I'm trying to use ScanFilter.Builder() to construct a filter for my bluetooth application, and it gives an unresolved reference error.
I have ScanFilter properly imported, and the ...
0
votes
1
answer
47
views
How to use BLE specification XML service files?
The link BLE device information XML is a BLE service XML file copied from the original GATT specification files. Can I and how can I use this XML file for my project on Android Studio in Java? I am ...
0
votes
1
answer
55
views
How to read Bluetooth Low Energy GAP characteristic values as a string?
Hello I am new to developing an app and even newer to the concept of BLE. I am developing an application on android using Java that is capable of scanning BLE devices nearby. The main purpose is to ...
1
vote
1
answer
44
views
Android BLE establishing connection
I am developing an Android BLE application for connecting with a BLE peripheral device. The BLE peripheral device has strong energy constraints and therefore the connection interval should be kept ...
0
votes
1
answer
61
views
Unresolved reference: Why isn't this variable being detected?
In the code below, "takePermission" and "bluetoothAdapter" aren't being recognized. I've been following along to this tutorial which seems slightly outdated, but his variables are ...
0
votes
1
answer
42
views
Capacitor error with @capacitor-community/bluetooth-le
I'm developing print feature for my app using these tech stacks:
"@angular/core": "~13.2.0",
"@capacitor-community/bluetooth-le": "^3.1.4",
"@capacitor/...
0
votes
1
answer
21
views
Using Android's MediaRecorder with a Bluetooth Microphone
Problem
I am unable to get Android's MediaRecorder to record audio from a connected Bluetooth microphone. Instead audio recordings use the device's inbuilt microphone
Question
Has anyone found a ...
0
votes
0
answers
20
views
I want make Bluetooth calling feature in Android App
If Phone A Having App A get a phone call it should be shown in Phone B having App B. Considering Both Phones are paired. How do I achieve this. I tried something. Is there any open source project for ...
0
votes
1
answer
39
views
How can I speed up my Android Bluetooth reception?
Hardware
The Bluetooth device is powered by a chip called atmega32 and uses a bm78 Bluetooth chip.
The clock frequency of the MCU chip is 14.7456 MHz.
The baud rate of Bluetooth device is 115200.
The ...
0
votes
1
answer
75
views
How to open bluetooth settings on Google Pixel with Android 14?
I want to open the bluetooth settings by sending an Intent with action Settings.ACTION_BLUETOOTH_SETTINGS on Google Pixel devices with Android 14.
It works e.g. on Samsung devices. However, on Google ...
0
votes
1
answer
25
views
NoSuchMethodException: BluetoothAdapter on release builds
My application is crashing out with the error Caused by: java.lang.NoSuchMethodException: f4.b.<init> [class android.bluetooth.BluetoothAdapter] when I run it in release mode. The app works fine ...
0
votes
0
answers
64
views
Getting 201: ERROR_GATT_WRITE_REQUEST_BUSY, when I tried to write to the same characteristic for the second time In flutter
I am working on a flutter application which communicates with the BLE devices, for BLE connection i am using the flutter_blue_plus: ^1.32.7 library.
I am able to List the Bluetooth devices and connect ...
2
votes
1
answer
33
views
why BleDevice disconnects automatically with android?
Some times when i connect to the ble device, it automatically disconnects after connecting.
I tried to disconnect it before connecting. It shows me connection success and in between shows message of ...
0
votes
1
answer
77
views
Bluetooth Adapter Enable or Disable Not Working
I was writing some code to turn on or off bluetooth adapter. But the problem is that I am using android 14 and it is not working. It calls the method but bluetooth still dooes't turns off if enabled ...
0
votes
0
answers
33
views
Android bluetooth read/write crashes when job cancelled
I am writing an Android App that connects to an OBD2 bluetooth device and reads ECU data from a vehicle. I create a bluetooth socket and open an input and output stream on the socket. I call a ...
0
votes
0
answers
25
views
How to send long strings by bluetooth HC05 module
I am building a bluetooth terminal app (Android) and want to send strings from my app to microcontroller via HC05 bluetooth module, I can share small strings near about 120 characters but while ...
0
votes
1
answer
46
views
Finding BLE Services
I'm trying to connect a smartphone running Android 13 to a server using BLE. Android 11 connects and finds services, but Android 13 can't find them. I have tried everything with permissions
I'd like ...
1
vote
0
answers
35
views
Android app development - Enable/Disable automatic focus on key press of external/physical keyboard
When trying to process input outside of a specific input field, Android always puts a focus on the first element of the currently selected or focused view (also highlighted with color). This is not ...
1
vote
2
answers
76
views
Does Android require the ACCESS_FINE_LOCATION permission to scan for Bluetooth devices?
I don't know what location has to do with Bluetooth, but my app won't recognize any Bluetooth devices unless it is granted the ACCESS_FINE_LOCATION permission. Even granting it the ...
1
vote
0
answers
31
views
After the Bluetooth device is bound, the uuid changes
I am doing carplay connection work. When connecting to a Bluetooth device, I found that the UUID of the device changed before and after binding.My car system is based on android12.
logs:
//During the ...
0
votes
0
answers
61
views
@brooons/react-native-bluetooth-escpos-printer don't print ARABIC text using printText
I am using @brooons/react-native-bluetooth-escpos-printer package for thermal printing. When I pass and arabic text to printText package method, it prints it in chines character.
I tried to encode the ...
-1
votes
1
answer
21
views
how to stop blue tooth app process and nfc service process or other name of process in system app in android 12 with java and flamingo?
I use android studio 2022.2.1 flamingo JDK 17 Gradle 8.7
blue tooth and nfc are off but i discover the system app named bluetooth app and nfc services app sometimes running even I manually stop the ...
0
votes
0
answers
42
views
Cannot get a callback from the FlutterBluePlus().turnOn(); method
I cannot get a callback from FlutterBluePlus().turnOn();
This is my function:
void checkIfBluetoothOn() async {
bool isBluetoothOn = await flutterBlue.turnOn();
if(isBluetoothOn){
...
0
votes
0
answers
16
views
Cannot find the AclBuilder class of android13 Bluetooth
/packages/modules/Bluetooth/system/gd/hci/hci_layer.cc
// Acl packets
BidiQueue<AclView, AclBuilder> acl_queue_ {3 /* TODO: Set queue depth */};
Android13 code
Is there any special way to define ...
2
votes
1
answer
53
views
(Android) Bluetooth connection & Data transfer
Bluetooth Classic
Im new to bluetooth API's so please excuse my ignorance.
I managed to connect my Galaxy Buds using rfCommSocket via SPP UUID.
How i can now transfer commands to my device and receive ...
0
votes
1
answer
53
views
Andoird [Bluetooth LE] create Characteristic with predefine value before advertising Service in a peripheral device(Android app)
My app act as a peripheral device advertising a Service with Characteristic with predefine value and the central device read it and process the advertising data
but I've been struggling with setting ...
1
vote
1
answer
45
views
Android: How to stop intent-based Bluetooth scanning?
I've been struggling with this issue for a long time and have searched through many articles, but still haven't found a solution. Could you please provide me with some direction?
I'm using intent-...
0
votes
0
answers
120
views
Bluetooth Jetpack Compose Implementation
I am building an Android app for a prosthesis but ran into the issue of trying to add Bluetooth functionality where I send strings to so select the pose I want to achieve.
I want to initialize ...
0
votes
0
answers
17
views
how to make bluetooth connection for all fragments?
override fun onOptionsItemSelected(item: MenuItem): Boolean {
initBtAdapter()
val pref = activity?.getSharedPreferences(
BluetoothConstants.PREFERENCES, Context....
0
votes
0
answers
38
views
Open source app goes to first item in BottomNavigationDrawer when you press a button on xbox controller
Check out my open source app - https://github.com/Rich43/GamepadMacroPlus
When you press a button on the xbox controller, it always goes to the first item in the bottom navigation drawer. I don't want ...
0
votes
0
answers
74
views
How to control Media operation via Bluetooth from One Android device to Another?
I need to create a android application similar to this https://play.google.com/store/apps/details?id=io.appground.blek&hl=en&gl=US but only the Media Controls Play/Pause Prev/Next and Volume. ...
0
votes
0
answers
411
views
How to pass a Flutter blue plus BluetoothDevice to an isolate (BLE)?
I currently having an issue with passing a BluetoothDevice to an isolate in flutter.
Note: I am currently using the flutter_blue_plus package to handle BLE operations within the application. Flutter ...
2
votes
3
answers
330
views
How to get battery level of a game controller from an Android application
I have developed an Android application that connects via Bluetooth to a gamepad controller and shows button presses, joy stick movements, etc made on the handheld controller on the Android device.
...
0
votes
2
answers
42
views
Detecting Bluetooth peripheral shutdown from Android App
I have a Bluetooth Low Energy peripheral device which I am connecting to from an Android app which I have developed. I can use onConnectionStateChange to detect when the devices move out of range and ...
0
votes
0
answers
19
views
BluetoothChat for Classic Bluetooth sample is marked as deprecated. What use instead?
BluetoothChat for Classic Bluetooth sample is marked as deprecated.
https://github.com/android/connectivity-samples/tree/main/BluetoothChat
Warning This sample has been deprecated and is no longer ...
0
votes
1
answer
23
views
How do I transfer a BluetoothSocket from one activity to another?
In my Android app, I've set up two activities:
Connection Activity: This activity helps find and connect to
Bluetooth devices. It shows a list of both paired and discoverable
devices.
Control ...
0
votes
0
answers
79
views
Issus with permission.BLUETOOTH_SCAN permission for android
I'm ussing react-native-ble-manager, when BleManager.scan() function is called, i get "Need abdroid.permission.BLUETOOTH_SCAN permission for android.connect,.AttributionSource@bb97c7c7:...
1
vote
1
answer
100
views
Android BLE: Difference between ScanResult.getTxPower() and ScanRecord.getTxPowerLevel()?
I'm a little bit confused about 'transmission power' with regard to Bluetooth LE and especially when using the android.bluetooth.le package.
There are two different methods to get data about ...
0
votes
1
answer
24
views
HCI_LE_Set_Host_Channel_Classification, where and how to find the corresponding API to use in Mobile APP
HCI_LE_Set_Host_Channel_Classification can be used to set channel map from a BLE Master to a BLE Peripheral.
import android.bluetooth.le.*, this is the library I used to make the mobile APP
Now our ...
0
votes
0
answers
22
views
How can I convert a spannableStringBuilder to integer in java on android without the app crashing?
So I am a highschool student (relevant cause I no real android knowledge) and I am making this app for bluetooth communication.
It should receive the values, convert them to integers, do some math and ...
0
votes
0
answers
100
views
Change of Bluetooth address or connection type of Bluetooth on Android by code
Is there a way by code to change Bluetooth settings on Android?
For example, change whether I have an earphone connection on my device, change the address or connection type from a car headset to an ...
1
vote
0
answers
54
views
How to receive Bluetooth value in Android app
BluetoothGattCallback mGattCallback = new BluetoothGattCallback() {
@SuppressLint("MissingPermission")
@Override
public void onConnectionStateChange(BluetoothGatt gatt, int ...
-1
votes
1
answer
36
views
Samsung SM-A546E Bluetooth in background odd behaviour
This is not a coding issue. And this question might get downvoted for that reason.
A brief history
We have a BLe device that advertise every 20 milliseconds. The phone (iOS or android) connects to the ...
0
votes
0
answers
65
views
Android: audioManager.communicationDevice returns TYPE_BUILTIN_EARPIECE on Android 14, even when bluetooth headset is connected
I have encountered this behaviour on Android 14, Pixel 6a when playing some ringtone in my app.
When I am executing the following code,
audioManager.communicationDevice?.type == TYPE_BLUETOOTH_A2DP
...
0
votes
0
answers
20
views
Send play/pause music from my android car stereo to my connected phone
I have an android car stereo which has a seperate bluetooth app which controls the audio playback from a connected device. I am building a seperate app which runs on the car stereo which should have ...
0
votes
0
answers
50
views
How to listen to media session events of another app
I have created an app that can listen to headphones action using media sessions and perform custom actions but when another music player platform like spotify or default music player is used media ...
0
votes
0
answers
94
views
React Native Bluetooth Classic Reading Issue
I am attempting to read the response after sending a command to the IoT device. I have verified that the command I'm sending is correct, and the IoT device does send a response, as I've confirmed ...
0
votes
0
answers
148
views
Flutter bluetooth low energy: custom characteristic and service
I am very new to Flutter so maybe this is a silly question but I have been stucked for long time so I would like to have some help here. I am trying to develop an app for android which could connect ...
0
votes
2
answers
58
views
Why do we get ERROR_GATT_WRITE_REQUEST_BUSY error while writing to characteristic if i enable notifications like in the below code?
object CHatServer{
private fun setupGattService(): BluetoothGattService {
//......
val rrepCharacteristic = BluetoothGattCharacteristic(
RREP_UUID,
...
0
votes
1
answer
33
views
Does Android have an equivalent of iOS's Core Bluetooth canSendWriteWithoutResponse?
While implementing firmware updates, we've noticed that different Android phones seem to have different levels of reliability regarding GATT characteristic writes without response. Some will block the ...