Making Bluetooth accessible without user confirmation

Android has an enable () method that seems to allow Bluetooth to be used without user confirmation. I was wondering if there is a way to enable detection as well as programmatically without user confirmation?

Many thanks

+3


source to share


1 answer


Study

I started researching the answer for you by reading about the enable () method. See "Setting up Bluetooth" , then # 2. It says:

enter image description here

Enabling Discoverability contains a lot of information that can be useful for preserving the DRY code or creating a workaround.



Answer

According to the documentation, when a device is detected, a pop-up will always be displayed to confirm the user.

The workaround provided by Android is not to detect the device at all: enter image description here

+4


source







All Articles