Android hangs up but restarts when flipped!

DrWave

Member
Licensed User
Longtime User
I have been working on app that receives 15 character bluetooth message from a micro+bluetooth transceiver to a GalaxyII phone. Using b4a I have got it commmunicating using either the serial example and also using async streams. So far so good. BUT - after 2 minutes or so it just stops getting new messages and just hangs. It is still connected. If I now pick up the phone and flip it so the orientation is now landscape, the communication automatically resumes only to shut down a few minutes later when the same procedure can be used to resume. Obviously not a practical way to maintain communication. Any ideas ? I have set KeepAlive and I also send a ping message to the transceiver from the phone every 2 seconds.:BangHead:
 

DrWave

Member
Licensed User
Longtime User
solved !!

This one solved. Here is what's going on for what it is worth - The activity was actually always running and getting data ( log data invaluable - Thanks Erel ) but I was appending the incoming strings into an EditText box. This apparently fills up and then it appears as if no new data is coming in. When you rotate the phone the activity is destroyed and recreated, so the EditText is cleared and the process continues until it fills up again. I could not find anything in the documentation about the maximum capacity of an EditText box.
 
Upvote 0
Top