Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Camera2 API - Android

I am trying to use new camera api provided by android as camera2. But

CameraManager manager = (CameraManager) getActivity().getSystemService(Context.CAMERA_SERVICE);

showing error. Does any one have worked on this api.

Have been searching for results for could not find any thing yet.

like image 378
Binod Singh Avatar asked Jul 01 '26 13:07

Binod Singh


1 Answers

Binod,

That will only works if your platform support API level 21 - that is the one come after Android L release.

For a detailed explanation of how camera 2 API works, you may want to take a look at this article

like image 72
pierrotlefou Avatar answered Jul 03 '26 03:07

pierrotlefou



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!