I am making an app to scan all tags using Bluetooth LE. I have to implement a interval feature where an user can enter seconds for scan delay, but i have not found any method to do so. I tried implementing TimerTask but it still scans more than one device in a second Is there any way to implement a
Tag: bluetooth
BluetoothGattCallback onCharacteristicRead never called back
I’m still trying hard to read from a BLE device (laser meter) from an android (using java) Basically I’m trying to get which fields are those I’m interested into (aka the measures) So far i discovered 5 services (i found the usage here): 3ab10100-f831-4395-b29d-570977d5bf94 (I can’t fi…
Byte array to string conversion
I’m making an Android app that communicates with bluetooth device. I’m writing a specific message to chosen characteristic as follows: My conversion function looks like this: I’m trying to figure out why in this case my conversion output looks like this: D/uploadDataset: Message: �����������…
Deprecated method “startActivityForResult()” vs properly bluetooth set up
Hey I try to make bluetooth service according to the information on the official android dev website. But I came across to the deprecate method startActivityForResult(). What should I do to properly turn on bluetooth device? Here is my code with deprecated method: Answer It’s a special AndroidX extension that…
android 10 is crashed when starting bluetooth service
in a couple of days before, I wrote some lines of code to connect application to a HC-05(a Bluetooth module) via a service. I know that a simple service can not be alive in a android 8+. so I modify my service using some free tutorials available on YouTube channels like the following: https://www.youtube.com/…
Android BLE Scan Callback is not called after scanning for BLE devices
I’m creating an Android app that scans all nearby BLE (Bluetooth Low Energy) devices using Android Studio. I think I have implemented all these documentations: https://developer.android.com/guide/topics/connectivity/bluetooth/ble-overview https://developer.android.com/guide/topics/connectivity/bluetooth…
Could not load FFI provider when using module-info.java
my Linux Java application uses bluetooth devices. I use this library in order to communicate with bluez stack : https://github.com/hypfvieh/bluez-dbus. It worked very well until I added module-info.java to my client code. Suddenly I got this error: Exception in thread “main” java.lang.UnsatisfiedL…
Buetooth connection failed: read failed, socket might closed or timeout, read ret: -1
I am trying to create a Bluetooth connection. I can search for nearby devices but when I try to connect I get an error I do not understand: LOGCAT I Have two classes for connect, one that receives the device and execute the connection, an other for make connection. ConexionActivity.Java ConnectThread.java Imp…
Difference between 0x0A and 0x0D
I was studying about bluetooth and I was trying to write the code to keep listening to the input stream while connected and i came across this following code snippet: Can someone explain what is the difference between 0x0A and 0x0D. And also give a brief explanation about this code. Kindly share your views. A…