BLE heart rate sensor fails to start after app has been closed by system

Krzysztof Antoszek shared this problem 4 years ago
Solved

On my Huawei P9 Lite the memory is very slim. When I open the Camera app Locus gets closed silently by the system (not every time). But Locus figures this out when i'm recording my position and continues from last point. This is great, but it's not true for the BLE heart rate sensor, which is disabled after restart and I have to enable it manually every time :/


If I forget to enable it I'm losing heart rate date from the point Locus was closed.


Note: I have the BLE heart rate device autostart for track recording option enabled

Replies (1)

photo
1

Good day Krzysztof,


unfortunately Huawei systems seems to be over-optimized and I'm still unable to make Locus Map work on this devices as expected in all cases. Anyway your situation sounds quite extreme. Did you tried to put Locus Map into some "saver mode"? Check mainly this option please: http://docs.locusmap.eu/doku.php?id=manual:faq:gps_lost_fix_android6#huawei_honor


Currently, Locus Map tries to automatically restored interrupted track recording if it happen within 10 minutes. You may try it ... if you restart Locus withing 10 minutes since it was closed by system, it should also restored all predefined "automatic actions" defined in recording profile. When it's more, then recording starts in "pause" mode and this automatic stuff is not restored.


From my point of view, main problem here is "killed Locus Map" and not restored connection to BT sensors.

photo
1

I have done those steps in the link you provided some time ago, this helps a little. But the problem is not that Locus is killed :) Android kills silently many apps. The problem for me is that track recording is restarted but without BT sensors, even if I have "autostart bt sensor" option enabled.

photo
1

Application that runs, in Android terminology, as "foreground service", should never be killed! And it happen to You.


Anyway what if you restart Locus during 10 minutes after it's killed? Is track recording restarted automatically and are sensors reconnected correctly?

photo
1

Application that runs, in Android terminology, as "foreground service", should never be killed! And it happen to You.


Ok, I'm not arguing here, you are right :) But if Locus has a "restore" function, and when that "silent kill" occurs only when I run another memory intensive app (like Huawei's Camera), then that will not be a problem for me. From my point of view, a full "record state restore" would be fantastic :)


I will test the 10 minute after-kill-interval tomorrow, as I don't have any sensors with me right now :/ I'll keep you posted.

photo
1

Hey,


I have just tested on latest version. Just recording restarts, BLE device has to be enabled manually.


BTW. Navigation się not restart either

photo
1

If you need any help (like logs or something) feel free to ask.

photo
1

Krzysztof, thank You for your offer.

If you will want, I'll at start of next week publish new Beta version , so feel free to test it. I really hope, we are in last step of iteration to rock stable BT connection. I hope :).


Anyway this probably still not solve your main issue with killing a Locus Map. I'll think about it later, how to deal with it better. Anyway it's little weird. I use official rom on Huawei P9 lite I use for testing and few days ago I enabled track recording for a half day trip and no problem for a whole time. Perfectly recorded track. Truth is that on this device is almost nothing except Locus Map, but still ...

photo
1

The problem exists only when I'm takinga call, taking a picture with the default camera app, using instagram or just checking something in chrome, while recording is active. Only then android kills Locus. But when I'm not doing anything besides track recording, Locus is not killed.


Question about BETA. Will this BETA version conflict with my pro version? Or can they be installed side by side on same device?

photo
2

Understand. Because I do not use my Huawei device for such use-cases, I probably do not suffer this issue.


And Beta ... read please orange text in mentioned link. All should be wrote in manual, thanks.

photo
1

Ok, installed. When a new beta is available I will test BLE connection restore function

photo
1

Hey, I would like to mention, that apart from BLE device, amd navigation also the Audio Coach does not start either :/


Secondly, I cannot test the beta, while having PRO version installed as this causes my screen to staty on, even if I have "stay on" option disabled in settings (the screen turns on every 1-2 sec). This leads to battery drainage. Removing BETA resolved this issue.

photo
1

Hello @Menion

Last Friday my Huawei P9 Lite was updated to EMUI5 (Android7). The problem ceased to occur on version 3.23.2. I cannot recrate the bug anymore. This is while having optimizations disabled for locus and kill app on screen off function disabled (Huawei protected apps).

So for me this is marked as resolved as I cannot create a "silent kill" of the application.

photo
2

Hello Krzysztof,

these are really good news. Seems that engineers in Huawei comes to light side and improved their crazy optimization system, perfect! Thank you for useful information!

photo
Leave a Comment
 
Attach a file