Closed AroonPro closed 1 year ago
Thanks - I'll merge it and try it out.
Well, it is running without crashing on the emulator using the Phone data source, which is good :) StartUpActivity seems to work correctly (it seemed to take longer to receive data than I thought it should, but that could be an emulator issue). ...but once StartUpActivity exits and MainActivity starts, SdServer shuts down for some reason. MainActivity still says Server Running OK, but the task bar notification disappears and I can see it has called onDestroy in logcat.
That Server destruction is exactly an issue where i'm diving into.
The delay of finishing StartupActivity is in when is the first set of mSampleCount satisfied. Maybe I add a message on the first received sensor values.
This night I've been running with a extra off body sensor de- reactivation.
Next step is maybe a subtle beep from the phone, notification displayed and MainActivity showing not worn.
Battery life increased big time
Op za 1 jul. 2023 22:45 schreef Graham Jones @.***>:
Well, it is running without crashing on the emulator using the Phone data source, which is good :) StartUpActivity seems to work correctly (it seemed to take longer to receive data than I thought it should, but that could be an emulator issue). ...but once StartUpActivity exits and MainActivity starts, SdServer shuts down for some reason. MainActivity still says Server Running OK, but the task bar notification disappears and I can see it has called onDestroy in logcat.
— Reply to this email directly, view it on GitHub https://github.com/OpenSeizureDetector/Android_Pebble_SD/pull/110#issuecomment-1616107885, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV6J743RK7XGQPPK2ZDD6MDXOCD67ANCNFSM6AAAAAAZ2ZMKXQ . You are receiving this because you authored the thread.Message ID: @.***>
Watch battery life in this case
Op zo 2 jul. 2023 09:52 schreef Bram Regtien @.***>:
That Server destruction is exactly an issue where i'm diving into.
The delay of finishing StartupActivity is in when is the first set of mSampleCount satisfied. Maybe I add a message on the first received sensor values.
This night I've been running with a extra off body sensor de- reactivation.
Next step is maybe a subtle beep from the phone, notification displayed and MainActivity showing not worn.
Battery life increased big time
Op za 1 jul. 2023 22:45 schreef Graham Jones @.***>:
Well, it is running without crashing on the emulator using the Phone data source, which is good :) StartUpActivity seems to work correctly (it seemed to take longer to receive data than I thought it should, but that could be an emulator issue). ...but once StartUpActivity exits and MainActivity starts, SdServer shuts down for some reason. MainActivity still says Server Running OK, but the task bar notification disappears and I can see it has called onDestroy in logcat.
— Reply to this email directly, view it on GitHub https://github.com/OpenSeizureDetector/Android_Pebble_SD/pull/110#issuecomment-1616107885, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV6J743RK7XGQPPK2ZDD6MDXOCD67ANCNFSM6AAAAAAZ2ZMKXQ . You are receiving this because you authored the thread.Message ID: @.***>
It might be a race condition doing the connection to the server.
I wonder if my waitForConnection works properly - if that did not really wait, what would happen?
(https://github.com/OpenSeizureDetector/Android_Pebble_SD/blob/V4.2.x/app/src/main/java/uk/org/openseizuredetector/MainActivity.java#L483)
Ow yeah That is one thing I noticed. At my part I take it out, because an UI has an prohibition in invoking a wait. The mHandler.post is invoked, the function wait finishes, where the Runnable is invoked after the delay expires.
Here does the connect not get invoked after.
If we place the connect inside the wait after boolean isServerRunning is true, it might work.
Op zo 2 jul. 2023 14:22 schreef Graham Jones @.***>:
It might be a race condition doing the connection to the server. I wonder if my waitForConnection works properly - if that did not really wait, what would happen? ( https://github.com/OpenSeizureDetector/Android_Pebble_SD/blob/V4.2.x/app/src/main/java/uk/org/openseizuredetector/MainActivity.java#L483 )
— Reply to this email directly, view it on GitHub https://github.com/OpenSeizureDetector/Android_Pebble_SD/pull/110#issuecomment-1616629456, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV6J747CZIZQYFHYNP6ZMLTXOFRY5ANCNFSM6AAAAAAZ2ZMKXQ . You are receiving this because you authored the thread.Message ID: @.***>
Request to pull in state until 230701. Includes to check for closure of reported issues.