No devices found during BLE scan on android 10

Hi,
all my old BLE projects don't go on android 9 and up.
Which is the right procedure?
I've tried the new version of BLE extension, I've activate Location services, but when I click on Scan no devices are shown.
When I call the "BluetoothLE.StartScanning" the "BluetoothLE.Scanning" remains always false.
Thank you.

SOLUTION:
Screen1.initialize > Call Screen1.AskForPermission > "android.hardware.bluetooth_le"

Hi there,

I have the same problem. I tried a.m. solution. However when I add the request for permission it tells me that the request is denied. I have to grant access in the Android settings. In the settings location-access is granted while app is in use. It's the same location-right-setting as I have for other BLE-apps: For instance "nRF Connect" or "LightBlue" are detecting plenty of BLE-devices and they have the same location-right-setting. Thus it sounds for me that it is a problem linked to the MIT App Inventor and Android 10. If I run my app on another mobile with Android 8, everything works fine.

Any help is appreciated.

Thanks

Frank

Yes, also me it tells that the request is denied, but BluetoothLE.StartScanning go well and find all rhe BLE devices.

Another problem is that I have tried on a wear os watch but the BluetoothLE.StartScanning doesn't go well and rhe devices list remains blank.

Does anyone know if this error has already been fixed? I have the same problem and it must have been some update of AppInventor since an .apk from a few days before with the same code if it works and the new builds do not.

This doesn't work for me. I just get a popup saying permission to android.hardware.bluetooth_le was denied. Galaxy Note 9.

Did you enable the permission using the Android Settings?

Something like: Settings>Apps>Select the name of the app you installed >Permissions and there might be an option for BlueTooth.

You could try that after building the apk and installing your app on the device.

Will it work? Perhaps, try it. For example: go to Settings, find your program under Apps and then set the permission.

I looked at the permissions for my app and there isn't any for bluetooth. The app asks for location access, to which my options are deny or allow while using the app. That's it. I tried toggling the location permission to deny and back to allow while using the app as I read that can fix a bug in Android 10 related to this but that didn't work either. I have location services on as well. Everything that needs to be on and set correctly seems to be and everything worked before the latest updates to AI2 and Android 10.

The behavior is the same regardless of compiling and using the .apk or using the AI2 Companion loader.

I completely agree. It seems that MIT App has recently updated their IDE which most likely caused this problem. Although it is not clear, if it is intentional or a bug.

I am creating a BLE app for Android10. And I have built a .apk file last July 17th which was able to scan and display discoverable devices perfectly. Today, I tried to re-build the same project, unfortunately it cannot scan nor display any available devices anymore. But if I re-install the .apk (BUILD:July17th), it works normally.

Guys,

The "andriod.hardware.bluetooth_le" below did not help my case...

Fortunately this one did...
I updated the BLE extension.

  • BEFORE: edu.mit.appinventor.ble-20190701.aix
  • AFTER : BLE-with-extensions-api.aix
    ※ version from Mr.Evan...
    ※ no need to incorporate the "andriod.hardware.bluetooth_le"

See below for the discussion thread...

Hi donatz,

worked perfectly for me. Apparently this is an upgrade of the BLE-extension to status of 2020 June. Before the extension I used had status 2019 July.

Thx and BR

Frank

I can confirm this BLE extension 20200616 works on my Note 9 again.

@ewpatton
Is the BLE extension going to be updated to 20200616 at this thread, or did I miss where its officially supposed to be released?

Thanks guys, now I can get on with my project. Love this community and your help!

1 Like

This update fixed the issue I was having with my S9 connecting to the BLE module, I knew the app was working because I could use it on my lenovo tablet.

:+1: