Take Picture from Custom camera using Camera API2.
dependencies {
compile 'com.katariya.autocameralib:AutoCamera:0.0.1'
}
<dependency>
<groupId>com.katariya.autocameralib</groupId>
<artifactId>AutoCamera</artifactId>
<version>0.0.1</version>
<type>pom</type>
</dependency>
<dependency org='com.katariya.autocameralib' name='AutoCamera' rev='0.0.1'>
<artifact name='AutoCamera' ext='pom' ></artifact>
</dependency>