Open jones139 opened 1 year ago
It is not obvious why this is occurring, and it does not affect performance seriously, so will leave it for V4.2.
I am struggling to reproduce it - I am wondering if it was something with my phone that I was using for testing as I can not make it happen on an emulator.
This I think, has to do with how we set-up the lifecycle:
Android does perform an ActivityDestroy. When destroying onStop will be called. It gets restarted and the third function being called is: onStart. in onStart is given: if isServerRunning(): server stop.
mHandler.postDelayed(()->{server start},100);
I think it will be something like that - I fixed a couple of issues with the server not stopping properly by delaying the re-start - I'll have a look in the mainActivity life cycle methods to see where to include this. Thanks! Graham
I have not seen this in V4.1.x or V4.2.x, so changing this to a V4.3.x issue
With the main page displayed, rotating the phone from portrait to landscape mode sometimes results in the main app screen disappearing and the background service re-starting. I don't know why this might be - there is no crash report generated - maybe a race condition relating to onPause and onResume? I have not had any success in reproducing it reliably so it might be difficult to find and fix.