Device bluetooth error with multi screens

Good morning friends, I am creating a home automation application and I found a small problem in my development. As my application has multi screens, there is only one screen for connecting via bluetooth (configuration -> connections) from my device to my arduino so the commands that my device sends to the arduino would be where the rooms of the house are located, more precisely, in the bedroom (rooms -> rooms -> room 1) where I'm focusing more. I would like to know what would be the way for example to create the correct procedure to pull the command of my bluetooth here. Well I managed to do everything on just one screen but I wanted to keep it separate. My apk is posted in case anyone wants to download and analyze the code. Thanks for listening. Note: I am new to both computing and arduino and build my projects myself, so I have a lot of difficulty creating the mobile app.

Hello Rafael

The answer is to use Virtual Screens.

When we define virtual screens, we use one 'real' App Inventor Screen (most often Screen1). Screen-sized Vertical Arrangements on it are displayed/hidden as required - they are the Virtual Screens. This is generally a better approach for multi-screen Apps, they share data without having to "pass" it between screens and it also reduces code duplication, making the App more efficient and the code easier to follow if you have to return to it at a later date.

So, instead of seperate houses, virtual screens are rooms of the same house.

1 Like

Thanks for help brother !!!