covid-be-app / cwa-app-android

Native Android app using the Apple/Google exposure notification API.
https://coronalert.be
Apache License 2.0
53 stars 10 forks source link

[Question] How the app check if a contact was at risk #102

Closed Jefidev closed 3 years ago

Jefidev commented 3 years ago

Hello, By curiosity, I started to check the code of the app to see what's going on but I was not able to find the place where the app retrieve the "risky" key from the server and perform a check to see of the use of the app is at risk or not. Could you tell me where I cant get this information? I could not find the process in the doc either.

leroynicolasalexi commented 3 years ago

Hi, You can find the revelant codes in the worker and transaction packages: DiagnosisKeyRetrieval[OneTime|Periodic]Worker shedules a RetrieveDiagnosisKeysTransaction that submit keys to Google Exposure Api then the ExposureStateUpdateReceiver trigger a new RiskLevelTransaction.

In foreground, transactions are directly called from the viewModels.