Please note that I don't respond to questions on the youtube channel but for those that require help I provide paid consultancy services here https://www.codementor.io/mobapptuts
Part 5 of the camera2 API tutorial series which concentrates on creating the background thread handler for the android camera2 api sessions & callbacks as well as closing resources when the application is closed.
For more info checkout -
Part 1 Look & Feel - • How to use android camera 2 API's - P...
Part 2 Surface preview sizes - • How to use android camera2 API's - Pa...
Part 3 Surface preview session - • Android camera2 API - Part 3 How to o...
Part 4 Starting camera preview - • Android camera2 API - Part 4 Starting...
The first part of this tutorial focuses on closing the resources when the application is closed. Care needs to be taken that the CaptureSession & CameraDevice are closed.
Then two activity members are created for the Handler & HandlerThread.
Then two methods are required for creation & closing of the handler.
Once the handler has been created it is made available to the openCamera & createSession methods so that their callbacks will execute on the background thread handler. Removing unnecessary processing on the UI thread.
API's covered:
HandlerThread
HandlerThread.quitSafely
HandlerThread.join
Handler
CameraManager.openCamera
CameraCaptureSession.close
CameraCaptureSession.setRepeatingRequest
CameraDevice.close
Android studio (1.3.1) is the editor of choice (IDE) for this tutorial series.
This tutorial series is the start of what I expect to be many so I encourage comments and feedback to improve the quality and viewing experience.
On this page of the site you can watch the video online Android camera2 API - Part 5 Setting up background thread handler with a duration of hours minute second in good quality, which was uploaded by the user Mobile Application Tutorials 30 August 2015, share the link with friends and acquaintances, this video has already been watched 7,754 times on youtube and it was liked by 61 viewers. Enjoy your viewing!