connectivity-samples icon indicating copy to clipboard operation
connectivity-samples copied to clipboard

My samsung S10 can't find devices

Open Norberto123456789 opened this issue 2 years ago • 8 comments

Hi, this topic is new for me and I have some doubts.

Please help me!!!

I download the project and I run BluetoothLeGatt in a Samsung S10+, but when the scan finish, it doesnt find devices. I have turn on the Bluetooth and I have some devices with Bluetooth on. I need to configure something?

Thank you very much!!!.

I want to know how can I use it, because I need to do a little program whose listen by Bluetooth Low Energy other devices and just take the information.

Norberto123456789 avatar Apr 08 '22 20:04 Norberto123456789

I find the solution with this.

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

Norberto123456789 avatar Apr 08 '22 20:04 Norberto123456789

This example get information for the other devices?

Norberto123456789 avatar Apr 08 '22 20:04 Norberto123456789

Yes, it works on the Samsung Galaxy A51 (after granting it location permission in the settings).

Zardshard avatar Apr 14 '22 01:04 Zardshard

It also works with

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

Zardshard avatar Apr 14 '22 01:04 Zardshard

After adnroid6.0, you must add in AndroidManifest.xml like this: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

and still you have to add in whatever activity you want to use the permission like this

if (ActivityCompat.checkSelfPermission(this,
                Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);
        }

Hadeslock avatar Apr 16 '22 12:04 Hadeslock

After adnroid6.0, you must add in AndroidManifest.xml like this: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

and still you have to add in whatever activity you want to use the permission like this

if (ActivityCompat.checkSelfPermission(this,
                Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);
        }

this code should place in "DeviceScanActivity.class" of ,then app can worked. public void onCreate(Bundle savedInstanceState) { if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1); } ....... ....... ...... }

357028692 avatar Jun 09 '22 10:06 357028692

I have all the permissions set but still: No BLE devices found.

otoo-peacemaker avatar Jul 06 '22 16:07 otoo-peacemaker

Can you check on the Logcat whether any error is shown? Or better post your complete Logcat for the scan process.

0x15feed avatar Sep 25 '22 18:09 0x15feed