I try use cwac-cam2 library to take picture
Sample code:
Intent i = new CameraActivity.IntentBuilder(this)
.to(new File(getFilesDir(), "picture.jpg"))
.updateMediaStore()
.build();
Tested on :
- Androin one marshmallow mito a10
- Activity is extended from AppCompatActivity
- Theme.AppCompat.Light
After click camera to take picture get error like below :
java.lang.IllegalStateException: CameraActivity confirmation requires an action bar!
11-10 21:31:54.526 11278-11278/com.plugie.towing E/AndroidRuntime: at com.commonsware.cwac.cam2.ConfirmationFragment.onHiddenChanged(ConfirmationFragment.java:84)