Skip to content

The user safety app written in Kotlin and based on MVVM(Model-View-ViewModel) architecture. Users can view crime precautions and news in their region and can mark or unmark themselves in trouble using various methods. The app also provides crime hotspots in particular region.

Notifications You must be signed in to change notification settings

chaudharirohit2810/Leo

Repository files navigation

Leo App

The user safety app written in Kotlin and based on MVVM(Model-View-ViewModel) architecture. Users can view crime precautions and news in their region and can mark or unmark themselves in trouble using various methods. The app also provides crime hotspots in particular region.

Download

Installation

  1. Download the Zip from the website or clone from Github Desktop.
  2. Unzip the github project to a folder. (If you have downloaded it)
  3. Open Android Studio. Go to File -> New -> Import Project. Then choose the Leo_Kotlin folder and then click Next->Finish.
  4. It will build the Gradle automatically and'll be ready for you to use. (Make sure you are connected to internet)
  5. In some versions of Android Studio a certain error occurs- error:package android.support.v4.app does not exist. To fix it go to Gradle Scripts->build.gradle(Module:app) and the add the dependecies:
dependencies {      
    compile fileTree(dir: 'libs', include: ['*.jar'])  
    implementation 'androidx.appcompat:appcompat:1.1.0' 
}

Screenshots

Features

  • Travel Safe
    • Intuitive map of crime hotspots in your region.
    • Crime hotspots are colored according to frequency of crimes in region.
  • Recent Crime News
    • Get to know recent crime incidents in your region.
  • Live location Tracking
    • The location is stored locally on your smartphone.
    • Remembers your last location.
    • User can explicity share your location via different platforms.
    • Location is implicitly shared only when trouble is detected.
  • SMS Notification
    • Peers are notified via SMS when detected in trouble
  • Power Button Detection
    • Trouble is detected when power button is pressed 5 times.
  • WiFi Direct
    • To create p2p connections with nearby peers so trouble detection can seamlessly work even when there is no cellular reception.
  • Fall Detection
    • Detecting trouble when mobile falls using algorithm applied on data received through accelerometer sensor.
  • Quick Settings Tile
    • Quick settings tile in system panel to easily notify when you are in trouble.

Directory structure

.
├── app ->  Containes the application relevant files.
│   ├── build.gradle(app-level) ->  to automate and manage the build process.
│   ├── debug -> contains debug version of apk.
│   ├── release -> Contains release version of apk.
│   └── src -> Contains source files for the application.
│       ├── main ->contains all the source code files.
│       │   ├── AndroidManifest.xml -> describes essential information about app.
│       │   ├── java/com/rohit2810/leo_kotlin
│       │   │    ├── Application.kt -> base class containing components like Activities and Services
│       │   │    ├── MainActivity.kt -> base activity for all fragments
│       │   │    ├── database -> contains all the database related files.
│       │   │    ├── models -> contains all the model classes.
│       │   │    ├── network -> contains interfaces to simplify api calls.
│       │   │    ├── receivers -> contains receivers for power button and notifications.
│       │   │    ├── repository -> contains design patterns that isolates data sources from the rest of the app.
│       │   │    ├── services
│       │   │    ├── ui -> contains the ui files for every fragments
│       │   │    │   ├── emergencyContacts
│       │   │    │   ├── intro
│       │   │    │   ├── login
│       │   │    │   ├── main
│       │   │    │   ├── map
│       │   │    │   ├── news
│       │   │    │   ├── otp
│       │   │    │   ├── permissionRequest
│       │   │    │   ├── register
│       │   │    │   ├── settings
│       │   │    │   └── splash
│       │   │    └── utils -> contains the utility functions
│       │   └── res -> Contains resource files written in xml for the application.
│       │       ├── anim -> contains animation files.
│       │       ├── drawable -> contains logos and vector assets.
│       │       ├── layout -> contains layout files for every fragment.
│       │       ├── menu -> contains layout file for menu.
│       │       ├── navigation -> contains navigation graph.
│       │       ├── raw -> contains lottie animation files.
│       │       ├── values -> contains values of colors, strings etc.
│       │       └── xml-> contains xml file for network security config.
└── build.gradle -> to automate and manage the build process.


Deployment

  1. Go to Build -> Generate Signed APK
  2. Choose APK -> Next
  3. If you already have keystore use that otherwise Click on create new. fill in the form with the required details. Click on the icon on the right with the 3 dots ("..."), which will open up a navigator window asking you to navigate and select a .jks file.Navigate to a folder where you want your keystore file saved.
  4. Create a key for your application and fill in all the required details.
  5. Click on Next and then select Release.
  6. You will get popup indicating the apk file path when android studio finishes build.

Built With

  • Jetpack Navigation - Helps in implementing navigation across different fragments.
  • Android lifecycle extension - These components help you produce better-organized, and often lighter-weight code, that is easier to maintain.
  • Retrofit - Retrofit is the class through which your API interfaces are turned into callable objects. Used to make network requests in android.
  • Moshi - Modern JSON library for Android and Java
  • Lottie - Mobile library for Android and iOS that parses Adobe After Effects animations
  • Glide - Fast and efficient open source media management and image loading framework
  • Room Persistence - Provides an abstraction layer over SQLite.
  • Data Binding - Support library that allows to bind UI components in layouts to data sources in app

License

Leo
Copyright (C) 2020  Rohit Kailas Chaudhari

This Leo is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Stay safe and Stay Productive

About

The user safety app written in Kotlin and based on MVVM(Model-View-ViewModel) architecture. Users can view crime precautions and news in their region and can mark or unmark themselves in trouble using various methods. The app also provides crime hotspots in particular region.

Resources

Stars

Watchers

Forks

Languages