My app about ble can not work please help me!

Make sure your companion app and BLE extension are updated to the latest versions (2.68 for companion). Also, please translate your blocks to English when you screenshot them.

Thank you very much for your reply. Please see my English picture。


Make sure your BLE release is current.

1 Like

It seems like you are building your app on a server that is out of date. The isDeniedPermission method was introduced in Form in nb172 (late 2018). Which server are you using?

Hello Isy

Looks like you are using a very old App Example? In any case, you cannot test a Bluetooth application with the Emulator - you must instead either use the Companion on your phone or an APK on your phone.

Since we have seen a photo of your phone - please tell us the exact Model Name, Android Version and Bluetooth version.

Also, what exactly are you trying to connect to? Model Name and Bluetooth Version. If it is a microcontroller such as Arduino or ESP32, please post the Script (Sketch) here.

thanks , my BLE release is 20230728

I use MIT APP Inventor2

Thank you very much for your reply. I want to connect my ESP32 BLE,but this problem occurs when scanning BLE.

you forgot to use the permission blocks as described here

(Canned Response ABG - Bluetooth non-BLE SCAN Permission Blocks)

These blocks can be dragged into your Blocks Editor to request permission(s) for Bluetooth non-BLE scanning and connecting. All three parts are needed.

You also will need to pull in TinyDB into your project.

When Permission Granted (@Patryk)

Thanks to @Anke for the original code.
My changes include

  • use of the Screen1 permission blocks to avoid the possibility of a typo
  • using a TinyDB tag particular to BT permissions and only for BT permissions.

(Thanks to @Patryk for correction to grant order)
Special note for Xiaomi devices:

And my Android Version is Android 12, I do not know my Bluetooth version :dizzy_face:

Thank you , I using the latest version of BLE,it should come with its own permissions. But I will try to add TinyDB in my project. Wish me success!

sorry, I was confused, I posted the blocks for the bluetooth component but you are using BLE...
for BLE see again the answer from @ABG here My app about ble can not work please help me! - #5 by ABG and study the FAQ


Haha It's okay. My latest version is not compatible with my system's Bluetooth so I'll just switch to the previous version. Thank you for your reply.

Android version and name + manufacturer of your test device?

Try this:

and post screenshots...

It should be BLE on an Android 12 phone.

Tank you very much !