Requesting Permission to enable bluetooth

I want to request permission to enable blutooth on phone after button click or auto on blutooth when application is opened.

Hi younus

As marked-up in blue:

BT_Basic_Setup.aia (8.4 KB)

2 Likes

(added to FAQ)

1 Like

i have placed many labels on my screen. should i insert a new label for this procedure to work?

thanks it worked now i need to know where did you get the ''closeapplication'' block ?

and I also want to know ::
How deal with errors when app fails or not responds . Thanks.....

1 Like

thank you for your help

HI Chris hw are you.
In this picture you have used clock timers are they different or same but renamed. Actually i have used a timer for bluetooth enabling Can i use the same timer for Receiving text from arduino?
as you did this photo?

Hi

Usually, the tasks require different time intervals. Also, it is easier to understand the code if you use a different Clock Timer component for each timer task, giving the component a meaningful name.

1 Like

i want to autoconnect to bluetooth as i open my app.

Maybe this can help you :

I More Recommend this one :
http://www.martyncurrey.com/android-mit-app-inventor-auto-connect-to-bluetooth/

1 Like

can you please elaborate? what exactly are you trying to do?
to enable bluetooth programmatically?
to connect to another device programmatically?
to pair another device prorammatically?

Taifun


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

an application which sends a '1' to arduino to start a task like blinking leds or something else like relays.
i want to make app easy to use not like you are trying to first find BT then choose and connect but as i open app it should have already connected and ready to send a '1'. to arduino. But i will manage no urgency not so important for me.

just frst connect to the device of your choice using the mac address and then send the "1"
you might want to try something anf if you got stuck, post a screenshot of your relevant blocks...

Taifun

1 Like

Thank you but I got the issue solved, I was just sending a "1" without line feed "\n" that was creating problems now I sent a "1" along with this "\n" and my problem got solved.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.