BluetoothLE1 extension: a permission issue

Hello. I've made an app for counting how many pools I swimm. My app scans BLE devices, search my smartwatch and then counts how many times "appears and dissapears" form the BLE.DeviceList.
It works fine but now I need the apk version to be installed and use in my mobile. So I generate the apk from my program but...
The problem is wen I run the apk in my phone, a meesage appears warning an runtime error. I share a screenshot. My mobile is a Samsung Galaxy M12 with Android v13.
Any help will be great.
Thank you ver much in advance.

Please search the community to find several threads about the permission issue and use the latest version of the extension


1 Like

This affects Bluetooth Classic and not BLE. With the latest BLE Extension (02/23/2023), the BT permissions are requested automatically, in contrast to BT Classic. However, the location sensor permission is not requested automatically, but must be done manually.

1 Like

Thank you for your answer. Could you tell me where I can find BLE Extension (02/23/2023)?

Thank you very much. Where can I get the latest version of Extension?



(Canned Reply ABG - BLE FAQ with Latest Versions for Permissions)

I followed this:
and I am pretty sure I used the latest version of the BluetoothLE extension, but still had 'permission' problems when I built and installed my apk. (but no problems when using the AI Companion)
My solution (which DOES work for me) was to

  1. add a Bluetooth Client (from Connectivity) to the AppInventor Designer
  2. add a Location Sensor (from Sensors) to the AppInventor Designer
  3. after installing, on my phone I went into settings-apps, selected the installed app, and then added permissions for notifications (probably unnecessary), Location (and selected 'precise location'), and lastly nearby devices.
    This is ALL I did. No additional blocks were necessary
    When I run the app, it does give a popup the very first time, but I agree to permissions and...
    Now it works. Let me know if this helps anyone!
    BLE_Basic_Connect.aia (190.6 KB)


Did you really read any of the links I posted?

Fair enough--I did not use the beta.
I do appreciate your work on this.
I just used the one here:MIT App Inventor Extensions because I thought it would be the latest proven stable version.
No disrespect intended.

Also, I think that all those "beta" versions that have been released over the last few years should eventually become a stable version, and the link to the current extension should be in the official ai2 docs.

1 Like