You would have to drop the incoming data into a variable if you don't want to immediately lose it after the contains block reports its results.
So if you wanted to save the incoming data for a log or for a total or for checking other input values, you would definitely need to capture it into a variable.
Variables are the dinnerware for data.
Don't visit the buffet without a plate.
Here you don't evaluate the effectiveness of the BT connection: if the connection hasn't had success, you start the Clock1 anyway, and this can lead to an unexpected behaviour.You shall start the Clock1 only after a successful BT connection
Second: don't enable the clock to run in background, because it will run also when you've changed the screen, and this still will cause problems, because it operates on the bT, but the BT is ceased when the screens are switched. To avoid this, you shall stop the clock before leaving the Screen1, and reactivate it only when the BT comm's are restored. (Typically when the BT is needed it is better to use "virtual screens" instead. You can find how doing it, by searching the forum with the tag "virtual screens").
Here below is where you shall stop the clock before leaving screen1 :
As I said, and as @ABG has confirmed, please store the incoming data into a variable (it costs nothing) and print the incoming data into a label, so to be able to see what is really entering into the app from the Ardiuino board. Once you've solved any doubt about the incoming message, you can just comment out (disable) that block, but leaving it there for any future needs. This also helps in understanding if the BT still works when switching between screens (remember to reactivate it whenever the screen1 returns to have focus).
I'm a "simple man" ( and tend to have a "simple approach" to problems ).
Your "bluetooth receiving algorithm" is not functioning as expected?
save the received string in a variable and display it in a "debugLabel"
( I'd also add the length of the string received, as you may find that arduino is sending not only 1 char )
I'd also verify that the arduino part is working as expected ( for example "serial printing" what transmitted via bluetooth ), and this should be the first thing to check
hmmmm... nope. i reply then you reply then i do then you do and so on. at least that i'm aware of.also @davidefa, made the text be put into a notifier, which should do the same thing, but in case it doesn't i put the text box in any way, but it still failand i did store it in a variable.
I see that we both are in a mess (more or less).
Let's start from scratch.
Fisrt of all we have to be sure that the BT transmission is working fine. When (and only after) we're done with that, we can go further.
To this purpose please find annexed an .aia that implements a transmission toward an Arduino system made by a UNO board together with an HC06. The annexed .ino is the correspondent Arduino code.
Please try them, and let us know. BT_to_Arduino_1.aia (26.4 KB)
does it work on your end? it doesn't for me. did you code it for hc-05, or HC-06? and i did go into bt devices and connect manually, sent ab and c but nothing came back. i think it has a hardware issue, so i'll try to figure that out. that .aia file uncovered what i think (and hope to be) THE issue. thank you very much.
Yes sure it works for me otherwise I'd never had annexed it to the post
HC05 or HC06 are irrelevant (unless your HC05 is set in Master mode, but unless you get a, "unusual" one, it shall be in Slave mode).
Can you please draw (also paper and pencil are enough ) your HW setup ? I mean UNO+ HC05+ pushbutton. Another question is : do you use a battery or are you using a 5VDC power supply ?
Another hint is: to try to divide where is the trouble (50%-50%), you can use the SBT to send A, B and C to my Arduino code. In this case the SBT can tell you if the Arduino is connected properly, if neither with the SBT it works, most probably the issue is effectively there.
SBT = Serial Bluetooth Terminal, free on Playstore: