I'm planning to make a camera app that you can take a photo with a background image. I guess there will be a need to use a Surfaceview? But the main problem is since the Camera is deprecated there might be a need to use camera2 for android. I want to make a camera app in portrait mode but are there any samples or tip? I googled but wasn't able to find a decent one. I would love to hear from you.
Asked
Active
Viewed 52 times
2 Answers
0
If you want to start with Camera2
API, this link will help you understand basics.
It is not necessary to use
SurfaceView
as you will see from code thatTextureView
can also fulfill your requirement

Jeel Vankhede
- 11,592
- 2
- 28
- 58
-
Thank you but it wont support android os 4.0 right? What am I supposed to do? – Nancy Sep 06 '18 at 05:59
-
Sorry that i can't help you much but you can join this discussion [discussion](https://stackoverflow.com/a/28417458/10271334) @Nancy – Jeel Vankhede Sep 06 '18 at 06:28
0
The HdrViewfinder sample app uses SurfaceView with camera2, though it doesn't lock itself into portrait mode. But that's a relatively simple change.
Of course, camera2 was only added in Android 5.0, so if you need to support 4.0, you need to use the old camera API.

Eddy Talvala
- 17,243
- 2
- 42
- 47