I have just ordered a CSI-2 camera, so soon I will have the whole kit (rPI3 + USB cam + CSI-2 cam)
. But I'll have to wait since I'll be away (mini-vacations!!) next week. Will get back to it and try to find an answer if someone hasn't done it before.
I have been playing today with a RPI-3 and a CSI-2 camera with Android Things. I must say that, up to now, I had never even plugged my RPI, so it was a nice surprise to see that it was quite straightforward to set the basics.
I tried to follow the same steps as you did with examples based on CameraEx and also JavaCameraView from the OpenCV library. Both of them crashed with log errors that I had never seen in Android devices...
I searched for these errors a bit and it "seems" that the hardware layer used (something named HAL3) isn't 100% compatible (at least at this moment) with the Android Camera API, and camera2 API must be used.
In short: in order to use a CSI-2 camera with the Raspberry Pi 3, you can either use Raspbian as suggested by
@derez (or other systems that directly support it).
If you want to use Android Things, then you need to access it through the camera2 API. At this moment neither the B4A camera lib nor the OpenCV JavaCameraView are based on camera2 API.
The good news is that there is a Camera2Renderer class in OpenCV for Android that uses the camera2 API. The bad news is that I didn't wrap it in my library so it isn't available from B4A. Again the good news is that I will try to do it since I am also interested in it (but perhaps it will take some time)