Questions tagged android-bluetooth

Explore the latest questions and answers asked by our top developers.

flutter dynamic list widget

Still in the search for bluetooth connection, I can now search for registered and available devices. But I’m stuck on rendering, I can’t create a dynamic widget to insert it in my page. I tested several example but always of error smessage. Here is my code with a future builder: import ‘package:flutter/material.dart’; import ‘package:flutter/services.dart’; import […]

By Davweb
Published
Categorized as android, android-bluetooth, bluetooth, flutter

Bluetooth SPP slower with newer version of Android

My Android app talks to my own ECG device. Everything runs perfectly fine when using an old (now discontinued) Kyocera E6560 phone that was running Android 5.5. I’ve recently purchased 8 different phones, running more recent versions of Android. All the new phones transfer SPP data 7 times slower than my old Kyocera phone. I […]

By David
Published
Categorized as android, android-bluetooth, bluetooth, java

Android auto Bluetooth pairing requst, how can I know if the user accept the pairing?

I try to connect via my app to a Bluetooth device, if it is not yet paired so Android pops up a pairing request, does there is a notification telling whether the user accepted the pairing request or not? These 2 registers are called when the pairing request is popped up, not after accepting the […]

By batsheva
Published
Categorized as android, android-bluetooth

Android 12 breaks AIDL/IPC with runtime permissions on IPC APK

Pre-Android 12 I could create proprietary Bluetooth health device driver service APKs and exchange info with them from a main application via AIDL. The driver APKs have no UI and launch nothing when installed. Though these APKs used Bluetooth and BLE all runtime permissions could be given from the primary application. These APKs could be […]

By Brian Reinhold
Published
Categorized as aidl, android, android-bluetooth, android-service

discovering bluetooth devices lists duplicate names android

Hello I am trying to make an application that recognizes nearby Bluetooth devices, my code works fine but it shows the devices it finds repeated. I tried the contains method, but it doesn’t work. [enter image description here][1] [1]: https://i.stack.imgur.com/hByAH.png a little help would be very useful since I’m stuck. Thanks private static final String […]

How to connect to a paired bluetooth device(On Item Click Listener)?

I am trying to connect to a paired Bluetooth device by clicking its name from a list. Can anyone tell me where I am going wrong? I am getting the following log: "Connection Failed". Here is the itemClickListener: private val mDeviceClickListener = OnItemClickListener { parent, view, position, id -> mBluetoothStatus!!.text = "Connecting…" // Get the […]

By Shaurya Goyal
Published
Categorized as android-bluetooth, android-studio

Detect bluetooth headphone’s buttons click

How can i detect bluetooth headphones buttons press i tried every possible code and it does not work. I am not building media app just need to detect headphone buttons and print in console. I tried: public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN){ Toast.makeText(MainActivity.this, "volume down" ,Toast.LENGTH_SHORT).show(); } if (keyCode == […]

By Viktor Pesic
Published
Categorized as android, android-bluetooth, java, kotlin

Android studio select paired device

I’m building a vehicle controlled by bluetooth. While listing the paired devices, if it sees the name and address of my bluetooth module, I want it to add CAR to the list. I wrote the code below for this, but it didn’t work, can anyone help? private void listdevices() { pairedDevices = myBluetooth.getBondedDevices(); ArrayList list […]

By Reach
Published
Categorized as android, android-bluetooth, hc-05, java

Android studio paired devices filtering

I am making a bluetooth controlled tool with android studio. When showing paired devices it imports all the devices the device is paired with to ListView, but how can I show only my module (HC-06)? private void listdevices() { pairedDevices = myBluetooth.getBondedDevices(); ArrayList list = new ArrayList(); if (pairedDevices.size()>0) { for(BluetoothDevice bt: pairedDevices) { list.add(bt.getName()+"n"+bt.getAddress()); […]

By Reach
Published
Categorized as android, android-bluetooth, java

Respond to bluetooth headphones buttons

I need to capture Buttons on Bluetooth headphones when the app is opened without any media. I tried the code below but it does not capture anything. Apparently, this is only for wired headphones use. I tried everything I can find on the internet but could not make this work. Do you have some way […]

By Viktor Pesic
Published
Categorized as android, android-bluetooth, kotlin
1 2 3 24

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq