Coder Social home page Coder Social logo

android's Introduction

ProtegoSafe Android app

Logo

Project structure

This is multi-module Android Studio Project. It can be compiled with gradle commands, or from Android Studio user interface.

Project modules

  • app - all the classes related to the Android UI such as view models, adapters, views, dependency injection
  • domain - in this module we place all objects that will interact with other layers
  • data - contains everything related to data persistence and manipulation
  • device - has everything related to Android that’s not data persistence and UI
  • opentrace - OpenTrace code for bluetooth tracking

Build Variants

Application has 3 flavours matching environments: Prod, Stage, and Dev.

Flavours have different:

  • Firebase configurations
  • URL for PWA

There are two build types: release, and debug.

Setup of the app

To get started on the app, setup and configure the following:

  1. ./gradle.properties

  2. Firebase - google-services.json

  3. Protocol version

Config parameters in gradle.properties

Name Description
ORG Organisation code indicating the country and health authority with which devices with installed application will be enrolled
SERVICE_FOREGROUND_NOTIFICATION_ID ID for tracing service notifications
SERVICE_FOREGROUND_CHANNEL_ID ID for tracing service notifications channel
SERVICE_FOREGROUND_CHANNEL_NAME Name of tracing service notifications channel
PUSH_NOTIFICATION_ID ID for push notifications
PUSH_NOTIFICATION_CHANNEL_NAME Name for push notifications channel
SCAN_DURATION Duration of BLE scan [ms]
MIN_SCAN_INTERVAL Minimum interval between BLE scans [ms]
MAX_SCAN_INTERVAL Maximum interval between BLE scans [ms]
ADVERTISING_DURATION Duration of BLE advertisment [ms]
ADVERTISING_INTERVAL Interval between BLE advertisments [ms]
PURGE_INTERVAL Interval between searching entries to purge [ms]
PURGE_TTL Maximum age of tracing entries in database [ms]
BM_CHECK_INTERVAL Interval between checks of temporary id validity [ms]
HEALTH_CHECK_INTERVAL Interval between self checks of Bluetooth Monitoring Service [ms]
CONNECTION_TIMEOUT Timeout for connections to other devices [ms]
BLACKLIST_DURATION Duration of blacklisting of contacted device [ms]
FIREBASE_REGION Firebase region (e.g. europe-west3)
FIREBASE_APP_KEY Application ID
STAGING_FIREBASE_UPLOAD_BUCKET Firebase bucket for uploading tracing files in debug type of application
STAGING_SERVICE_UUID Bluetooth service UUIDin debug type of application
V2_CHARACTERISTIC_ID Id of BLE characteristic
PRODUCTION_FIREBASE_UPLOAD_BUCKET Firebase bucket for uploading tracing files in release type of application
PRODUCTION_SERVICE_UUID Bluetooth service UUIDin release type of application
PROD_WEB_URL PWA URL - prod build flavour
STAGE_WEB_URL PWA URL - stage build flavour
DEV_WEB_URL PWA URL - dev build flavour
SAFETYNET_API_KEY Api key for safetynet

Firebase and google-services.json

Setup Firebase for the different environment. Download the google-services.json for each of each environment.

Prod: ./app/src/prod/google-services.json

Stage: ./app/src/stage/google-services.json

Dev: ./app/src/dev/google-services.json


Protocol Version

Protocol version used should be 2 (or above) Version 1 of the protocol has been deprecated


ChangeLog

2.0.1

Basic version with PWA, and notifications

3.0.1

Added OpenTrace module for collecting BLE contacts

3.0.2

Improved Bluetooth module operation

Added support for deleting all data collected by Bluetooth module

3.0.3

Fixed wrong condition for battery optimization check for Android 5

SafetyNet check disabled - removed verification if device is rooted

android's People

Contributors

pawelbyszewski avatar mikolak avatar jakublipinski avatar qlb avatar pkleczko avatar maciekjanusz avatar theimowski avatar tomaszmnich avatar dariuszseweryn avatar michalkuchtar avatar cierpliwy avatar mzgreen avatar tobiaszolejnik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.