Giter Site home page Giter Site logo

androidsourcetools / easycam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from balakrishnanpt/easycam

0.0 1.0 0.0 1.15 MB

EasyCam makes it easy to implement Camera features in Android App so easily. It offers Single and Multiple photoshoot mode with a preview option.

License: Apache License 2.0

Java 100.00%

easycam's Introduction

EasyCam

We have developed this module while working on one of our project

How to use

  1. Add dependency in module gradle file
    implementation 'in.balakrishnan.easycam:easycam:0.0.3-rc5'

    implementation 'androidx.recyclerview:recyclerview:1.1.0'

    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0-rc03'

    (Viewmodel and Recyclerview are used to maintain state and list the images. We are working on to provide support without viemodel or recyclerview)

  2. Start the Intent when required from activity or fragment

     Intent intent = new Intent(this, CameraControllerActivity.class);
     intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
     intent.putExtra("inputData", new CameraBundleBuilder()
             .setFullscreenMode(false)
             .setDoneButtonString("Add")
             .setSinglePhotoMode(false)
             .setMax_photo(3)
             .setManualFocus(true)
             .setBucketName(getClass().getName())
             .setPreviewEnableCount(true)
             .setPreviewIconVisiblity(true)
             .setPreviewPageRedirection(true)
             .setEnableDone(false)
             .setClearBucket(true)
             .createCameraBundle());
     startActivityForResult(intent, 214);
    
  3. You will get the results in onActivityResult() callback.

    @Override
    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == 214) {
            if (resultCode == RESULT_OK) {
                assert data != null;
                list = data.getStringArrayExtra("resultData");
            }
        }
    }
    
  4. Delete the files once you are processed them using following function FileUtils.clearAllFiles(this, getClass().getName());

The above function requires context and bucket name.

What EasyCam offers

  1. Screen orientation handling
  2. Output image orientation handling
  3. Front and Back cam support
  4. Flash support
  5. Single and multiple photo shoot mode
  6. Set minimum and maximum count for multiple shoot mode
  7. Preview of taken photos
  8. Manual focus
  9. Live preview in full screen or fit to aspect ratio
  10. Delete option in multiple shoot mode

The standout point in Easy cam is that all components are configurable (i.e) Capture button drawable, Done button background and text.

Also we have thrown in a cool feature that preview badge image will turn along with the device orientation. We can either enable or disable this.

Change Log

You can see the change log here

Contribution

Interested to contribute to EasyCam, You are one pull request away. You can go through the guidelines here

Contact

Reach out to me in Twitter

easycam's People

Contributors

balakrishnanpt avatar

Watchers

 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.