Question about TaifunBluetooth extension

Hello my friend its me again.
I am trying to make a block which will check if the bluetooth is enabled and if its not to enable it.

I used....
if call taifunbluetooth1.state = false
then call taifunbluetooth1.enable

but its not working... Can you tell me what i do wrong?

Thank you very much!!!

From the documentation App Inventor Extensions: Bluetooth | Pura Vida Apps

Get Bluetooth state.
Possible values: Bluetooth off, Turning Bluetooth off, Bluetooth on, Turning Bluetooth on, Unknown.


I replaced the false with "Bluetooth off" and worked!!

Thank you very much!

1 Like

one last thing... I would like to add new line when the scanning is completed because the result is shown as "device1","device2","device3" is it possible to do that? Sorry for my questions but i am new to mit app inventor

Thank you very much!!

You can do whatever you like after scanning... in the example project the paired and new devices are displayed in listpickers

Adjust the example blocks to your needs App Inventor Extensions: Bluetooth | Pura Vida Apps
Also try the example project to understand how to use the extension

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Tutorials for MIT App Inventor to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor


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

1 Like

Definately i will have a look!!! Thanks for sharing...
Now as far as i can understand the newdevices and the paireddevices are variables that hold a this correct?
I believe that i should use the block split so to split the valriable at the point where it has the "., and at that point to add a \n new line so instead of showing ..


to see


Can you help of how i should do that?
Thank you very much!!

let's take a look into the documentation together

Event indicating that Scanning has finished.
As result two lists will be provided, a list with already paired devices and a list with new devices.


So these are lists or variables ? Because i got confused...
Lists aren't marked with blue colors? And variable with orange?

A variable is something like a container for different values... a value can be for example a string, number, list or a dictionary
In this case it is a list...

Please first learn some basics... see again my previous post with some links to tutorials etc