I have come across two ways for custom camera implementation in android. First way is to use the deprecated camera 1 api second is to use the latest updated camera 2 api which does not seem to have a back port for devices below api 21 (Lolipop). My application supports API 18 minimum. Is there any way of doing it without using both api's and providing version checks.
Asked
Active
Viewed 800 times
0
-
Even though camera 1 api is deprecated, it's fully functional and a lot of apps use it. Just ignore the warnings of Android Studio, or increase your api level to 21 – Sergey Emeliyanov Mar 22 '18 at 09:47
1 Answers
0
I think you can use below custom camera api for your requirement.
gradle file:
compile 'com.otaliastudios:cameraview:1.4.1'
custom camera view set like:
<com.otaliastudios.cameraview.CameraView
android:id="@+id/camera"
android:keepScreenOn="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
for full support you can use below link:
https://github.com/hyl87/CameraView-1
i hope it will help you

Ketan Patel
- 2,155
- 19
- 27
-
-
@maxwellnewage At present, link not available but you can try to search "CameraView" SDK for android in web. May be you will able to find other link for same..! – Ketan Patel Jun 03 '20 at 11:47