Android camera2 API - Part 5 Setting up background thread handler

Publicado em: 30 Agosto 2015
no canal de: Mobile Application Tutorials
7,754
61

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.


Nesta página do site você pode assistir ao vídeo on-line Android camera2 API - Part 5 Setting up background thread handler duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Mobile Application Tutorials 30 Agosto 2015, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 7,754 vezes e gostou 61 espectadores. Boa visualização!