Coder Social home page Coder Social logo

arindamxd / android-camerax Goto Github PK

View Code? Open in Web Editor NEW
115.0 10.0 21.0 539 KB

CameraX aims to demonstrate how to use CameraX APIs written in Kotlin

Home Page: https://developer.android.com/training/camerax

License: Apache License 2.0

Kotlin 100.00%
android kotlin jetpack camerax

android-camerax's Introduction

Android CameraX

CameraX aims to demonstrate how to use CameraX APIs written in Kotlin.

Get it on Google Play

Open Source Love License

Overview

CameraX is a Jet-pack support library, built to help you make camera app development easier. It provides a consistent and easy-to-use API surface that works across most Android devices, with backward-compatibility to Android 5.0 (API level 21).

  • Ease of use
  • Consistency across devices
  • New camera experiences

While it leverages the capabilities of camera2, it uses a simpler, uses a case-based approach that is lifecycle-aware. It also resolves device compatibility issues for you so that you don't have to include device-specific code in your codebase. These features reduce the amount of code you need to write when adding camera capabilities to your app.

Lastly, CameraX enables developers to leverage the same camera experiences and features that pre-installed camera apps provide, with as little as two lines of code. CameraX Extensions are optional add-ons that enable you to add effects like Portrait, HDR, Night, and Beauty within your application on supported devices.

Build

To build the app directly from the command line, run:

./gradlew assembleDebug

Test

Unit testing and instrumented device testing share the same code. To test the app using Roboelectric, no device required, run:

./gradlew test

To run the same tests in an Android device connected via ADB, run:

./gradlew connectedAndroidTest

Alternatively, test running configurations can be added to Android Studio for convenience (and a nice UI). To do that:

  1. Go to: Run > Edit Configurations > Add New Configuration.
  2. For Roboelectric select Android JUnit, for connected device select Android Instrumented Tests.
  3. Select app module and com.arindam.camerax.MainInstrumentedTest class.
  4. Optional: Give the run configuration a name, like test roboelectric or test device

Find this project useful ? ❤️

Support it by clicking the ⭐ button on the upper right of this page. ✌️

TODO

Implement photo editor, live filters and face detection. Add many more features and bug fixes.

Contact - Let's become friends

License

   Copyright (C) 2019 Arindam Karmakar, Android Open Source Project

   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.

Contributing to Advanced Android Training

All pull requests are welcome, make sure to follow the contribution guidelines when you submit pull request.

android-camerax's People

Contributors

arindamxd avatar riyasvaliyadan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-camerax's Issues

Preview shows distorted and captured photos are not in high resolution

I want to achieve two things

  1. Camera preview should be always focused on. The camera should not try to autofocus it should be a continuous focus. Like we can use focus mode to be Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE in Camera API.
  2. When I take photo, it is not saving in maximum resolution even though, I have set setCaptureMode(CaptureMode.MAX_QUALITY) in the ImageCapture config.

CamraX turned blank

I build an app using CameraX codelab example, that is orking fine, but once my mobile gone into sleep and screen turned off, the CameraX transmittion had not been resumed after returning the mobile to normal status, and the CameraX screen remain white?

Panorama mode

Is support for a panorama mode planned or in progress or at least technically possible? This is a must have feature for me, and my preferred Camera App is based on CameraX

Not Working

When i am creating any build then it is showing this error which is written below.

Caused by: java.lang.IllegalArgumentException: path may not be null or empty string. path='null'

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.