Code Monkey home page Code Monkey logo

android-customcamera's Introduction

CustomCamera(中文说明)

It's a custom Camera Project. Now it includes Basic camera functions. Then I Will fill many functions. E.g Front and rear mirror switch, Flash Mode, Delay shooting, Square viewfinder,Then i will Add watermark effect and Camera2 Api.

You can download the apk file folder , and then install the apk demo

If you want to define your own interface , then you can view the detailed CameraActivity and change its layout file activity_camera.xml.

DownLoad Apk

Some notes

In My MainActivity Such calls:

CameraUtil.getInstance().camera(MainActivity.this);

Then onActivityResult get the picture returned , you can also create your Activity calls like this.

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if(resultCode != AppConstant.RESULT_CODE.RESULT_OK){
        return;
    }

    if(requestCode == AppConstant.REQUEST_CODE.CAMERA){
        String img_path = data.getStringExtra(AppConstant.KEY.IMG_PATH);
        int picWidth = data.getIntExtra(AppConstant.KEY.PIC_WIDTH, 0);
        int picHeight = data.getIntExtra(AppConstant.KEY.PIC_HEIGHT, 0);
                
        img.setLayoutParams(new RelativeLayout.LayoutParams(picWidth, picHeight));
        img.setImageURI(Uri.parse(img_path));
    }
}

#Note: If you do not need to cut the square ffmpeg video works can be removed to reduce the apk volume

android-customcamera's People

Contributors

jinguangyue avatar

Stargazers

 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.