Bluetooth list picker does not work with Samsung


I have created an app that connects to a Bluetooth BLE module to send commands.
Now the problem is, my app works fine with my HTC phone, but with a Samsung phone it does not show the list to pick the device. Should it be created with special commands for the Samsung phone? I have tested it with two different Samsung phones and both had the same issue! With my HTC the app works without any problem.

I have attached a picture from the list picker part. I do not know if this is enough?

Best regards


No one has an idea?
If I should show something more or another part, let me know please!

Here I have some pictures from the full Bluetooth connection part. With my HTC M7 it works just fine. With a Samsung S8 or Samsung A40 does not work! I have really no idea why. I plan to buy a new phone as well, because the battery is not good and the kamera is demaged. But if I cannot use my app on the new phone I have to rest with my old HTC.

hola, yo conecte varios samsung, con los bloques de appinventor sin ningun problema, incluso los conecto a hawei y no hay problema.

But with this blocks I have added here I cannot connect with a Samsung phone. Any idea what is wrong with my app? Or is it really a problem with some Samsung phones and I have the luck to get this two models that does have problems with the Bluetooth connection for generally?

Which version of the BluetoothLE extension are you using? You can click the ? icon next to the item in the component palette to get the version number.

It is the newest version as I know. Version number 20181124

Is the device paired in the Android phone Samsung?

Can you try only StartScanning in bluetoothButton?

When I start my app that I have posted the blocks here, the text “Scanning…” is shown and it appears that it scans correctly. But the list to pick the device does not show on the Samsung, on both Samsungs does not show! With my HTC it works correctly as it should.

A Bluetooth BLE 5.0 device can not be paired like a older Bluetooth version as I know! When I try to pair the module in the Bluetooth settings it does not work on all three phones, the HTC and Samsungs.

Ok. That's a good start. Were you prompted for location permission when you first called StartScanning? If you check the Settings app on your device and look at the companion's permissions, does it have Location permission allowed? For Android 6.0 and higher the app needs to request location permission (the version number you have should do that) and the user must grant it before scanning is allowed.

Yes, the window popped up like on the HTC and asked to allowing for location permission. As I have said, it works really everything like on the HTC (where it works!), but it does not pop up the list picker to select the device. As I have set up, the text “Scanning…” appears, so it seems the Samsung scans for Bluetooth devices. As the App comes to the point where I should select the scanned device in the list picker, the Samsung phone does nothing and no list pops up! The text rest on Scanning… and no error message or something else shows. It happens only nothing! When I click a second or third time on the bluetoothButton that I have made it happens nothing else too. That is the actual point I am! I have really no idea why it does not work on the Samsung. I thought Sumsung phones have perhaps other commands that I should need?! If I can test this app on a Huawei too, I will give it a chance! But do not know when I can get a Huawei for testing. My brother has his old phone somewhere, but do not find it at the moment :-/ if the app will work on the Huawei too, I really ask me, what Samsung makes special!
But if someone has another idea, please let me know!

By the way, why is the location permission needed for the Bluetooth function? That needs only more battery from the phone! Bluetooth itself does not need a location as I know.

One possible bug in your program, which may or may not be causing issues, is that you call StopScanning in DeviceFound. The DeviceFound event runs multiple times, once for each device encountered while scanning. Maybe there is something the Samsung is reporting that the BLE extension doesn't know how to interpret, so the event fires but the list is empty, and then scanning stops? What if you temporarily disable the StopScanning block?

Location permission and location services are two different things. Because BLE beacons can contain information about the location of the device in the real world, Google decided to make it so that you also have to request location permission so that the user is aware (in theory) that they might be giving away location information, even if you never use other location services. The BluetoothLE extension does not use location services, but it does ask for location permissions in accordance with the Android requirements.

The BluetoothLE extension is also open source, so you're welcome to inspect the sources:

I will give it a try and delete the stopScanning block temporarily. I try it this evening and let you know if something is different.

Thanks for the information about the location permission/services. It sounds interessting, and I will take a look at it, thank you very much!

You can also take a look at the Bluetooth Overview page on the Android Developer site for a more detailed explanation about the permissions:

te voy a pasar mis bloques para que lo adaptes a tu royecto, lo tengo fuccionando actualmente en un samsung

ve a esta pagina, esta en español pero ese metodo fue el que me funciono:

I have tried it, but without luck! It does not show the list to choose the device.

But this is the normal Bluetooth connection, not with the Bluetooth BLE extension! I have a Bluetooth BLE module and this is not working with the normal Bluetooth connection. Thank you anyway!

Could you clarify what you mean by this? Looking at the blocks, I see an Open call, which makes me think that bluetooth_List is a ListPicker object. It will suffer the same problem as stopping the scanning because the ListPicker's list of elements is "frozen" at the point Open is called. ListPicker opens a new activity and it is handed the list of elements at the time it starts. It does not dynamically update while it's open. Instead of opening it, maybe have your "available devices" button also include the length of the elements property to see if it's growing (after disabling the Open block). If you start seeing the number go up, then you know it's gathering device info. If it's always 0, something else is going wrong.