Register a custom camera source using the camera API

I have quite a bit of experience with the camera API, but I couldn't find any documentation to answer this question ...

Most phones already have front and back cameras. Is it possible to simulate a third camera through software (perhaps using a service) and register this with the api?

The idea would be that we define a custom camera, register it with the Api, and then any camera app can get it by going through the available cameras.

I present several cases where we might want it ...

  • There are some external cameras (like a FLIR thermal imaging camera) that could provide this.

  • We could combine the front and rear camera images into one image and view it. I know not all phones support opening both cameras at the same time, but some do, and I can imagine this functionality would be cool for third party video chat apps like Skype ... In particular, since Skype doesn't support this by registering directly with the Android Camera Api, we could bypass the Skype API limitations as our custom camera would look like one of the default Android cameras.

So will it be possible? Or what technical constraints prevent us from doing this. Maybe the Android Api just doesn't allow us to define a custom origin (I know the Sensor API doesn't do this, so I wouldn't be surprised if this also applies to the camera API).

+3


source to share





All Articles