Bluetooth screen1 and bluetooth screen2 Not passing on talent

When I change the screen to a new screen The app's Bluetooth connection has ended, but the Bluetooth indicator light It still shows the connection status. It looks like the app doesn't send the connection status.
This caused me to edit the code to disconnect. and then reconnect when changing screens But what I encountered was the lag symptom. Work stopped for a period of time. Makes work look smooth Can the connection status be forwarded between screens? without having to connect again
Thank you for the good things that have given us the opportunity to use them and I hope that they can develop smoothly.

If you switch screens you have to reconnect .. but what about using virtual screens?
See also tip 1

Taifun

1 Like

Thank you, but in the next page I have over 130 buttons, which are very dense, and each one has a different action. It's difficult to add an action to switch between very different formats. If you can forward the ability to connect instead of auto connect, that would be very good.




Sections on page 2 and page 3 Use actions on the same screen that are similar.

Is each grid coordinate a button?

Keeping the data in a list of lists or a dictionary with key row,column would be more general, and
would allow you to draw the values on a Canvas iteratively.

That would save a lot of buttons.

1 Like

Thanks for the advice. Yes, every box has a button. to allow changing the value in the field, and I used Listed item to loop. Initially I didn't list the buttons. And there was a severe stuck problem in connecting the items to the point that no further code could be written.
That problem I have fixed. But the problem that we are currently trying to solve is the symptom of being stuck while using a smartphone. While the app is Auto connect bluetooth Which I think should be able to pass on the ability to connect instead of Auto Disconnect and Connect.

Pages in an app created in app inventor are separate activities in android. You can read about activity. Activity is like separate applications merged into one. So writing about maintaining connection during page change is a waste of time, because it can't be done. You would spend this time better changing screens to virtual ones. And instead of hundreds of buttons you can use TableViewer extension.

1 Like

thank you

Dear @campus2modify,
provided that the use of "virtual screens" is the best solution in terms of ease of coding and ease of use, by reading your post, that is to say the need of having a BT communication alive when switching between screens, I've tried to use the extremely powerful extension Itoo (by @Kumaraswamy ) that runs in background to manage the BT communication across two screens, and it works.
You can find my app and related Arduino code for testing at the following link:

I don't know whether it will hlep you, with your already made app, because Itoo imposes its rules (i.e. some restrictions on the use of UI and global variables) and it is probably more complicated to adapt your app to the use of Itoo rather than adapt it to the use of virtual screens, but it demonstrates that it is possible to maintain alive the BT client also when switching across Screens. Honestly until yesterday I was convinced that it was NOT possible to maintain alive the BT when switching across screens, but thanks to Itoo, i've found that it works.

Good luck !

3 Likes

It's really wow. I'll give it a try. Thank you.