I want to create a popup to get bluetooth on off permisson

I want to create a popup to get Bluetooth on-off permission and then I also need to get pop up if Bluetooth is off it should turn on

Welcome!
If you want to turn on Bluetooth in order to create a wireless connection, you should use the ACTION_REQUEST_ENABLE Intent, which will raise a dialog that requests user permission to turn on Bluetooth, see also this snippet.

Taifun

But it is not giving a popup it is just giving a error

Do you like to reveal that error message?
What is your Android version?
Taifun

i do not gert a specif eerror message but just saying that bluethooth device is turned off or something like it my android is the ;atest

Android 13?

It would really help if you provided a screenshot of your relevant blocks as well as a screenshot of that message, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Hi here are few errors


As @Taifun already said:

sure sorry forogt to add them
image
i hpe this helps to resolve the issur

Remove the second line in the AfterPicking event
This does not make any sense at all...
To see what you are doing use Do it

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

I did that to denote connection is secure anyways it still shows same error without theline

show us the screenshot again including Do it results

also to upload an image please follow this suggestion: To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

hi, here is the edited block image


the do it function is greyed out

you have to connect with the companion app as it is described here

Taifun

I did try that but there is one caveat when u use the companion app i am unable grant it permision so i am unable to connect it to ane device

Settings → Apps → MIT AI2 Companion → Permissions → Nearby devices:

Oh thanks it is now containing but i still get error saying Mac address is not valid

Probably now you are able to provide this

Taifun

Hi i am not sure how but the issue is fixed thank you very much

Fine, then show your final blocks so others can learn from them too.