Skip to content

Latest commit

 

History

History
148 lines (115 loc) · 7.61 KB

File metadata and controls

148 lines (115 loc) · 7.61 KB

Project Name

Kotlin Version API Codacy Badge Build Status

Getting Started

Add some sort of description about the project. These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Android Studio IDE setup

For development, it requires Android studio version 3.5 or above. The latest version can be downloaded from here.

Libraries Used

  • Foundation - Components for core system capabilities, Kotlin extensions, and support for multidex and automated testing.
    • AppCompat - Degrade gracefully on older versions of Android.
    • Android KTX - Write more concise, idiomatic Kotlin code.
    • Test - An Android testing framework for unit and runtime UI tests.
  • Architecture - A collection of libraries that help you design robust, testable, and maintainable apps. Start with classes for managing your UI component lifecycle and handling data persistence.
    • Data Binding - Declaratively bind observable data to UI elements.
    • Lifecycles - Create a UI that automatically responds to lifecycle events.
    • LiveData - Build data objects that notify views when the underlying database changes.
    • Navigation - Handle everything needed for in-app navigation.
    • Room - Access your app's SQLite database with in-app objects and compile-time checks.
    • ViewModel - Store UI-related data that isn't destroyed on app rotations. Easily schedule asynchronous tasks for optimal execution.
    • WorkManager - Manage your Android background jobs.
    • Espresso - Use Espresso to write concise, beautiful, and reliable Android UI tests.
  • UI - Details on why and how to use UI Components in your apps - together or separate
  • Third party
    • Kotlin Coroutines for managing background threads with simplified code and reducing needs for callbacks
    • Retrofit A type-safe HTTP client for Android and Java.
    • Glide An image loading and caching library for Android focused on smooth scrolling.
    • SDP An Android SDK that provides a new size unit - sdp (scalable dp). This size unit scales with the screen size.
    • SSP Variant of sdp project based on the sp size unit.
    • Timber A logger with a small, extensible API which provides utility on top of Android's normal Log class.

Architecture used

  • MVVM architecture, ViewModel and LiveData
  • Koin: A pragmatic lightweight dependency injection framework for Kotlin developers.

Static Code Analysis Tool

In this project, we have used eight different type of Static Code Analysis tools as listed below

1.  CheckStyle
2.  Lint
3.  Findbugs
4.  PMD
5.  KtLint
6.  Detekt
7.  Spotless
8.  Sonarqube

Permissions used

Automatically granted
  • INTERNET: requires for accessing the internet.
  • ACCESS_NETWORK_STATE: used by the browser to stop loading resources when network access is lost.
Requested only when needed
  • WRITE_EXTERNAL_STORAGE: Requires for downloading and storing files.
  • READ_EXTERNAL_STORAGE: Requires for reading files from the external storage.
  • ACCESS_FINE_LOCATION: Requires for sites like Google Maps, requires "Location access" option to be enabled (default disabled).
  • RECORD_AUDIO: Requires for supporting Audio recording option to be enabled (by default, its disabled).
  • CAMERA: Requires for supporting Camera image capture option to be enabled (by default, it’s disabled).

How to setup project?

  1. Clone this repository in a location of your choice, like your projects folder, using this command "git clone <your-repo-url>" over terminal.

  2. Start Android Studio and go File/Open select project folder.

  3. It will take some time to build and download Gradle dependencies.

  4. Once completed, there will be a message that says "BUILD SUCCESSFUL".

  5. Yup! You are all set now. To run just hit ► the (run) button. 🚀

How to use?

There are two different productflavors available for running the project either in development or in production environment.

  1. Development - Set the active Build Variant as "developmentDebug" to run the project in the Development environment.
  2. Production - Set the active Build Variant as "productionRelease" to run the project in the Production environment.
  productFlavors {
            development {
                it.buildConfigField 'String', 'BSA_BASE_URL', '"<stage-url>"'
                it.buildConfigField 'Boolean', "CRASHLYTICS_ENABLED", 'true'
            }
            production {
                it.buildConfigField 'String', 'BSA_BASE_URL', '"<production-url>"'
                it.buildConfigField 'Boolean', "CRASHLYTICS_ENABLED", 'false'
            }
        }

Beta Testing

We are using Fabric Beta for downloading the app for beta testing.

To checkout the beta versions of the application using Fabric, you’ll need to receive an invitation email from the developer or get access to a public invitation link, and have a device that you can use to test.

Important credentials