I'm working with a low energy device that can be very finicky with certain android phones and when it doesn't connect after a phone restart I want to either reset the android Bluetooth service(clear it's storage) or ask the user to do so.
Is there any way I can do this?
Related
My app is currently in need of a way to know if I could know the users device is currently connected to the any bluetooth device when the application is launched/activity is launched/resumed/paused, Ive tried ACTION_ACL_CONNECTED but it can't check device connection state when the device is already connected before the activity is launched or connected outside the activity
I am making an Android app that will communicate via Bluetooth with other devices. These devices need to check WiFi hotspot. How can I, from inside the app, check if the phone is an WiFi hotspot?
I don't need to turn hotspot on from the application, just check if it has so I can tell the user to turn it on manually to be able to use the app.
EDIT:
I just realized the question is not really correct.
The phone with the app I am developing connects to internet via wifi. Then it needs to share internet with other devices via Bluetooth. The answers here worked fine to check if WiFi hotspot is on. But I need to check if it can share internet via Bluetooth with other devices.
The phone gets internet via wifi, but the devices have to get internet via Bluetooth.
I want my android app to automatically connect to a paired BlueTooth device as soon as this device is powered on. Right now I do it by checking every second, whether the device is in range or not but I hope there is a better way?
For example, can I register a receiver, which is executed as soon as a Bluetooth device is in range? (like with BluetoothDevice.ACTION_ACL_CONNECTED, but not for the connected-event but for a „in range“ event)
I am trying, without success, to pair a bluetooth device with a Android phone without asking to the user the PIN.
My idea is to fetch the desired PIN from a web service because the bluetooth device I want pair needs to be used from more people (and so for more android phones) without knowing and enter the PIN.
Do you have any idea for do it? I tried to see Bluetooth classes, but always, during device connection, I need to enter the PIN.
Thank you in advance!
You can use "just works" feature of Bluetooth pairing. This works only with SSP(secure simple pairing), from Bluetooth 2.1 onwards.
You have to set the IO capabilities of device for this to work.
Do you think it is possible to play a movie or something on the computer and hear the voice of the video instantly and remotely on a java based mobile phone via a bluetooth connection?
The speed of a bluetooth connection between the phone and the computer is like 40 KB/s and that looks enough for a voice transmission. But i couldn't find any software that can do this. Please someone give me info about the the possibility of my wish.
You can do it if the Bluetooth device supports Handsfree profile or A2DP sink profile
typically a mobile phone would not support these profile roles (they would support the opposite role Audio Gateway / A2DP source) So you will not be able to route the voice to the mobile phone.
But a Bluetooth headset that support these roles (most do) will be able to get the audio routed to it.
Does it help ?