android-Camera2Basic icon indicating copy to clipboard operation
android-Camera2Basic copied to clipboard

Permission

Open rsegecin opened this issue 11 years ago • 6 comments

Camera2BasicFragment.java:514 "getActivity().checkSelfPermission(Manifest.permission.CAMERA)" call requires API level 23 but the current min set is 21. I'm testing in my phone that has API level 21 installed, what is the workaround or maybe deprecated version of 'checkSelfPermission'? Thank you very much.

rsegecin avatar Sep 13 '15 01:09 rsegecin

Just need to change with the following code

image

rsegecin avatar Sep 13 '15 04:09 rsegecin

I'm having the same issue. Thanks for the tip it works.

rcgonzalezf avatar Sep 13 '15 16:09 rcgonzalezf

I would reclassify this as a bug, as the app flat out won't run on Android 5.x devices in its current state.

commonsguy avatar Nov 08 '15 00:11 commonsguy

Thanks @rsegecin

Payetus avatar Dec 08 '15 15:12 Payetus

The whole Camera2 API seems to be half-baked to me. CameraManager has setTorchMode method which is valid only API 23 onwards, but Camera2 itself is supported on API 21. Why the half-baked API?

snijsure avatar Dec 27 '15 23:12 snijsure

This sample has been migrated to a new location where we can accept Pull Requests (check README for more information).

As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.

If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!

codingjeremy avatar Sep 19 '19 22:09 codingjeremy