Considering that essentially its goal is to develop a camera app, we start with the references of using external cameras in the development for Android. The system SDK supports the use of USB cameras as explained in this article (in English).
You need to use the API Camera2 to read the camera stream, and at the same time can display that stream in a SurfaceView
and, according to your need, make the captures using the same methods of this API. I believe that the tutorials related to the mentioned API should be enough for you to be able to implement this functionality. This Codepath tutorial has some interesting references.
Regarding timing, there are several ways to implement. You can have a service/alarm that, when triggered, starts the camera app, which in turn performs a capture and closes automatically. Or, for example, keep the app open and in your instance, a timer that does this control. Note that in both cases it will be necessary to keep the mobile screen always on, so you will probably need extra permissions, such as the WAKE_LOCK
.
Hello, welcome to the OS! Please detail your question. With more information it is easier for us to assist you. Are a start aspects like the type of application (whether it is an app or service), camera model, communication protocols, etc.
– Mathias Berwig
Thank you so much for the tips, I believe it is now clearer and objective
– G. Moura
So, in summary, your goal is to create a camera app that supports simultaneous capture of two images with timer, correct?
– Mathias Berwig
yes, exactly that !
– G. Moura