Introduction
As a developer, you can just launch an intent, grab the data, and do with it whatever you want.
Things become a little bit more complicated if you want to handle image or video capturing yourself. So, why would someone want to do that in the first place? It gives us more flexibility in the way the camera is being previewed, filtered, or handled.
With Android Lollipop onwards, the old Camera API that we had been using has been replaced with the Camera2 API, which has turned out to be a huge improvement. Unfortunately, some orientation issues remain, mostly due to the large fragmentation of Android hardware and software. On some devices, captured images seem to be rotated 90 degrees. Why is that? You will find out in the last recipe in this chapter.