I connect HC-05 in one screen but when I go to another screen it disconnects. And I cant understand how to reconnect it. I will not use one screen and make visible and etc. Can someone please help? I need to complete it for the project
You can't keep the bluetooth connection when you change screen. The solution is to work in one screen and change layout.
Same as you already did it in Screen1
For Bluetooth it really is recommended to use only one screen together with virtual screens if necessary
Alternatively
Taifun
Someone just said to reconnect it in all screens but I can understand how
How did you connect in Screen1?
Just do the same in another screen
Taifun
Dear @asiya, my example, that @Taifun has linked in his post, is intended to show how to make a BT connection staying alive (like the Bee Gees song
) when changing across Screens.
It uses the capability of Itoo extension (by @Kumaraswamy) to work in background, therefore being capable to share data (those exchanged with the BT) with two, or more, screens.
Though I'm the author of that code and it works fine, I strongly suggest to use virtual screens instead: it's really more easy.
Of course it's up to you to decide which way to follow...
Best wishes !