after reading through the "hoops" I'd have to jump through to make an NDK program work... I am back to square one...
If there is a way we can "enable" and "disable" what cameras the android OS "sees" then it also solves everyone's issues with having to use the simplewebcam / dashcam apps.... since they'd be able to use the built in and all third party camera apps with their webcams!
this would be a great feature and is worth investigating for many people as it opens up useful new functionality and use cases for the android tabs.
from reading the android documentation, I can see that "CameraID" actually has only a 0 or 1 value corresponding to a "front" or "back" camera... so adding extra camera profiles in media_profiles.xml seems redundant?
The best approach to take is to:
1- disable the existing cameras
2- set the USB cameras as cameraId 0 / 1 .
That way compatibility with all android camera apps is maintained since they would find cameras using the simple cameraID tag, and everyone would be able to use their USB camera with all existing camera apps.
Perhaps they would need a separate "media_profiles.xml" file called "media_profiles2.xml" and the "camera toggle" program renames the "built in" media_profiles.xml file, then changes the "USB media_profiles.xml" to media_profiles.xml...
once the user is finished and wants to go back to using the built in cams, the program can swap the media_profiles.xml files back again.
Of course this would need a rooted handset/tablet?
now the question is, how do I go about doing this? I am guessing somewhere within the android system it uses V4L2 and thus /dev/video0 / 1 / 2 to set the CameraId that all android apps access. but where is that?