Giter Club home page Giter Club logo

open_dash_cam_android's Introduction

Open-source Dash Cam for Android

Dash cameras are the most objective eyewitnesses on the road. The more drivers use dash cameras, the safer our trips and daily commutes are. Open Dash Cam was born with the idea of making dash camera accessible and available to anyone with a smartphone to make driving safer and responsible. It is a project by community for community.

There is a number of dash camera applications out there, but all of them take up entire screen that most drivers need for navigation, Uber or other applications that provide helpful on-screen information during the commute. The idea behind Open Dash Cam is to create a minimally-intrusive on-screen widget, that will leave the major part of the screen to any other application the driver chooses to use.

Design and Implementation

Open Dash Cam is a dash camera widget, that is drawn over other apps, allowing users to record videos in background while using other apps, such as navigation. Open Dash Cam

The core functionality of the application is performed by two services: WidgetService, which draws the widget icons over other apps, and BackgroundVideoRecorder, which records videos in background and rotates them.

The way application works is the following:

  1. User starts the app
  2. Permissions are checked
  3. Some navigation app is started in background (see function here)
  4. WidgetService and BackgroundVideoRecorder services are started.

About BackgroundVideoRecorder service

This service continuously records video in pieces of specified length in the background, using the rear (primary) camera, and saves them in dedicated application directory. Once the directory size reaches specified quota, the videos get rotated (the oldest one gets deleted to create space for a new one).

When a new recording starts, we save the current and previous recording filenames in the database. We need this so that when users select "Save recording" we will mark the videos as "starred", so that they are not deleted during rotation.

When the video reaches specified length, we let MediaStore Content Provider know about the new file, and repeat the recording process.

ViewRecordingsActivity

This is a browser for videos recorded by the app, built as a Recycler View. We get arraylist of recordings by querying MediaStore populating the list with Recording objects.

open_dash_cam_android's People

Contributors

babulpatel1309 avatar dmitriy-chernysh avatar eclimov avatar maxneaga 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.