Exposure Notification (Corona) Scanner Implementation
See original GitHub issueROM: lineage-14.1 unofficial build - Android 7.1.2
GmsCore: dirty build, commit d641ca7e7e9a147f65120c5cb40216c11744b702
device: Sony Z5 compact (E5823)
Corona app: CWA 1.3.0.37
Hi, I am having some issues running the EN API. First I noticed that after running EN for a while the preferences app did not show any collected IDs. So I debugged a bit. My device seems to scan for 30mins and then stops. It only continues scanning after disabling and re-enabling EN or rebooting (basically after the ScannerService
is restarted). I added some debug output printing seenAdvertisements
to the callback function onScanResult. I see those debug prints for 30min and then stopping. They only restart after restarting the ScannerService
.
Since nobody else noticed while testing, it might be a problem with my device/bluetooth chip. Nonetheless, it might be worth finding the issue or changing the implementation in case it affects other people. Since there is no error message it might go unnoticed and basically breaking the EN scanning functionality.
While searching for the reason of the bug I also had a look on the Google implementation / description. Please correct me if I am wrong, but I think your current implementation constantly / all the time scans for other devices? The EN system, at least as envisioned from Google/Apple, should actually only scan for a couple of seconds in an interval of a couple of minutes (when the device is woken or every 5min). Do you have a reason for the continues scanning other than to have a quick first release? I guess it is also not very battery friendly (ok, there is a “battery optimization” item on your todo list). Probably my problem would also be solved with a system, which scans only every now and then (where the ScannerService is restarted).
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
All looks well after a day, thanks again for fixing it and your work on EN in general 👍
I started testing it today in the morning (~3 hours ago) and until now it runs without any problem. I will close the issue if it continues running until tomorrow morning. Thank you for the quick fix