android-bluetooth

Android BLE // Using custom service UUID

左心房为你撑大大i 提交于 2020-01-02 07:09:12
问题 We are developping a custom bluetooth low energy peripheral and we need to define our custom service. Based on this link: https://www.bluetooth.org/en-us/specification/assigned-numbers/service-discovery All short UUID (16 bits) are reserved pending future revisions of the BT services specs. And it seems that current version of Android (4.4) doesn't support the 128 bits UUID. So basically i can't use a 16 bits UUID for defining my service, but i can't filter my services with Android for a 128

Scanning large number of BLE Tags

孤街醉人 提交于 2020-01-01 09:40:09
问题 I was looking for a possibility to scan a large number of BLE Tags (StickNFind) in a single scan. I have noticed that when I scan for 10 seconds I can detect around 20 BLEs easily. When I increase the scanning interval to around 30 seconds and try to scan a large number of BLE Tags e.g. 200 Tags, I see an error in the LogCat about buffer overflow (GKI_exception). This problem occurs somewhere in the core Android libraries, which I am unable to debug. The exact error log is attached. 11-27 11

Not receiving data from BLE device

∥☆過路亽.° 提交于 2020-01-01 07:06:10
问题 I'm here again. So, long story short: in my app I'm trying to receive datas from my BLE device (tickr heart rate monitor: that) with the help of Android Samples (that). But... I'm not receiving datas from my device! I'm able to get the Characteristics and the Descriptor, but... nothing more. I simply.. miss the point . Here's my code: private BluetoothLeService mBluetoothLeService; private ArrayList<BluetoothGattCharacteristic> mGattCharacteristics = new ArrayList<BluetoothGattCharacteristic>

BluetoothDevice always returns null on getName()

痴心易碎 提交于 2019-12-31 03:56:25
问题 I'm facing this issue consistently in Android 4.4, 5 and 6. I'm performing a BLE Bluetooth devices scan and after it I can access their address (getAddress()), and other data. But if I call device.getName() it returns null EVERY TIME. This documentation is not helpful, it only says that returns null if "there was a problem" : https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getName() Other posts that I visited unsuccessfully : https://code.google.com/p/android

Ble Scan service of a device without connecting to it

痞子三分冷 提交于 2019-12-31 03:22:45
问题 I want to scan some device with BLE. I only want to show my device, so for know I get the name of the device and if it is the good one I put it in my list. if (device.getName().contains(DEVICE_NAME)) { mDevices.put(device.hashCode(), device); invalidateOptionsMenu(); } My problem is that if I change the name of my device this check will be false. So I look if it was possible to get some uuid of some services that I add to do the check with something that would not change. And the only way is

BluetoothSocket: Server and Client connecting error in accepting request and sending request

寵の児 提交于 2019-12-25 08:41:43
问题 Before this, I had asked a question about the CLIENT side in stackoverflow.com , there is no solution to the client side yet. So I am thinking maybe I can show the server side, make a comparison between these two side. FYI, currently testing on an android version 6.0.1 device. Below is my code(SERVER): public class MainActivity extends AppCompatActivity { BluetoothAdapter mBluetoothAdapter; IntentFilter mIntentFilter; BroadcastReceiver mReceiver; Intent discoverableIntent; private

Bluetooth:onReceive() and registerReceiver() these method never been called

会有一股神秘感。 提交于 2019-12-25 08:16:26
问题 I am developing an application for a Bluetooth client side, and inside this application has a listview that will list out all the connected devices. First, the application will check for the availability of the Bluetooth and then try to connect to another device(Server) , beside that, I initialised the intent filter in the manifest file. Below is my code : public class MainActivity extends AppCompatActivity { ArrayAdapter<String> listAdapter; ListView listView; BluetoothAdapter

receive Character using Android phone from arduino

天大地大妈咪最大 提交于 2019-12-25 04:28:14
问题 I worked this code to receive a single letter of the arduino I can not see any response on the phone text viewer when I want arduino sends the letter 'A' shows me the word 'ON'and if Send 'Z' shows me the word in the text viewer off Note that the connection between the Android phone arduino been successfully and Android phone sends to arduino but it did not receive class Ahmed extends Thread { public void run() { for (; ; ) { try { int bytesAvailable = btSocket.getInputStream().available();

How to initiate a call from HF through AG via Handfree Audio Gateway in Android?

╄→гoц情女王★ 提交于 2019-12-25 03:13:06
问题 So far I have been able to initiate a call from the AG (Audio Gateway) which is an Android phone through bluetooth connection from the phone in which my app is loaded (the HF or Hands-free), to the target phone. I have used this code for this procedure: /////////////////////////////////////////////////////////////////////////////// //Here, how to establish voice connectivity from AG to my phone(HF)? ////////////////////////////////////////////////////////////////////////////// // Calling the

Text-To-Speech over bluetooth

给你一囗甜甜゛ 提交于 2019-12-24 15:18:58
问题 I'm designing an application with Text-To-Speech and it works. Now I want to use the bluetooth headset (not AD2P) to receive audio. Reading Android documentation about startBluetoothScoOn I see: Note that the phone application always has the priority on the usage of the SCO connection for telephony. If this method is called while the phone is in call it will be ignored. Similarly, if a call is received or sent while an application is using the SCO connection, the connection will be lost for