Skip to content

CWA Inhalt UI, Bluetooth, Risikoberechnung, Notifications

JuliusBro edited this page Jun 11, 2020 · 3 revisions

The packages are structured as de.rki.coronawarnapp.*

exception

ExceptionReporter is used to generically report exceptions

http

HTTP communication with servers. Classes for building, sending and parsing HTTP-requests, as well as requesting tokens.

nearby

Code to consume Google Exposure Notification API. This is where the scanning and broadcasting for other devices happens.

notification

Local notifications

receiver

BroadcastReceiver for com.google.android.gms.nearby.exposurenotification.EXPOSURE_CALLBACK. This is a receiver for the Exposure Notification Exposure State Updated event in Google Exposure Notification API

risk

Contains the code for the calculation of the risk level

service.diagnosiskey

Retrieval of diagnosis keys from server.

sharing

Code for QR code sharing. For testing purposes only.

storage

For persistence. LocalData class is used to persist using SharedPreferences.

Stores tracing data, risk levels, submissions and exposure summaries

transaction

Transaction management using Google Exposure Notifications API. Transaction abstract class offers general functionality. Contains the transactions for risk level calculation, as well as submission and retrieval of diagnosis keys

ui

Fragments and activities for ui. The key activities are:

  • LauncherActivity - if the user is new, routes to OnboardingActivity, else MainActivity
  • OnboardingActivity - onboarding
  • MainActivity - home screen

OnboardingActivity and MainActivity follows the 'single Activity multiple Fragments' pattern

  • also contains the package information with fragments for additional information, such as About, Contact, Legal, Privacy, Technical and Terms & Conditions

util

Helper functions declared as object, such as functions for formatting, security and smaller helper functions.

worker

Background tasks, using CoroutineWorker, mostly used to retrieve the diagnosis key.

Clone this wiki locally