scalefocus / virusafe-android

The repo for the ViruSafe Android project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ViruSafe for Android

ViruSafe aims to help fight with COVID-19 by offering people to share their symptoms as well as track the spread of COVID-19 with an interactive map, that shows how the infection spreads throughout Bulgaria.

ViruSafe mobile app provides access to the following:

  • Receive up-to-date information regarding COVID-19
  • Regular symptoms sharing
  • Sharing your location, in order to compare your location to all users who have developed symptoms
  • Option to be warned if you have been in close proximity to other symptomatic users
  • Option to receive location-based notifications and alerts

Get it on Google Play

Overview:

Build Instructions

  1. Make sure you've installed Android Studio.
  2. Setup your dev environment by running sh setup-dev.sh from the root directory of the project.
  3. In Android Studio, open the project from the local repository.
  4. Go to the Use a Mock API and create your own Mock API, after that put the newly created endpoint in the gradle.properties file in the default_endpoint property.
  5. Connect a device or emulator and run the project.

Note: The project depends on different build variants, which are configured in the build.gradle files of the project. There are 3 build types:

  1. Debug - The preferred build variant for development.
  2. Release - This one is for building the release apks for the store.
  3. Mk - This one is for switching to other locales/regions apart from the BG version. It is preferred to use the Debug type for making any new changes, but make sure when you introduce them that all of the other build variants are still working.

Code Styleguide

Language

We use Kotlin.

In order for code changes to be accepted, they should use the Kotlin programming language, or provide a detailed and justified explanation why Kotlin was not used.

Formatting

We use our own android-code-formatter.xml file, which can be found in the repo. The formatting is build upon the official coding conventions from Google and JetBrains, so you should use it too.

Static code analysis

For static code analysis we use the checkstyle and detekt plugins. Before committing any new changes it is a good practice to run both of the plugins to check for any issues, other ways your changes may be declined. To run both of the plugins use the following commands:

$ ./gradlew checkstyle

$ ./gradlew detekt

Note: Currently we have some issues in the project which are coming from both of these static analysis tools. We are aware of that and we are working on fixing them - virusafe-android#3. If you want to help us resolve them you are more then welcome.

Gitflow guide

The main branches that we have are master and develop. Master branch is used when we create a release version with feature - we create a PR from the develop branch to it with updated versionName or when we have to make a hotfix - we create the branch from master and when we are done we create a pr to both the master and the develop branch and push a tag with the version name that we are going to release. When we create a feature normally the feature branch is from develop which also happens to be the destination branch. The bugfix is done from source develop to destination develop.

The branches naming is as follows:

  • feature/{name}
  • hotfix/{v1.2.8}
  • bugfix/{name}
  • master
  • develop

Note: If we are working on GitHub issue we use it as {name} of the branch otherwise we choose appropriate name which describes the task we want to develop.

When you leave TODO in the code it should always have the issue connected to as a comment.

Using the REST API

Swagger Documentation for the ViruSafe REST API is available at the ViruSafe SwaggerHub.

Also, the ViruSafe Swagger API Docs are available for download as JSON and as YAML files. These become useful when setting up your Mock API.

Using a Mock API

To develop the mobile app against a Mock API, please check the guidelines on how to Use a Mock API.

Contributing

Read our Contributing Guide to learn about reporting issues, contributing code, and more ways to contribute.

Security

If you happen to find a security vulnerability, we would appreciate you letting us know by contacting us on - virusafe.support (at) scalefocus.com and allowing us to respond before disclosing the issue publicly.

Contacts

Feel free to checkout our Slack Team and join the discussion there ✌️

License

Copyright 2020 SCALE FOCUS AD

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

The repo for the ViruSafe Android project

License:Apache License 2.0


Languages

Language:Kotlin 98.7%Language:Java 1.1%Language:Shell 0.2%