title: Android as an UVC Camera
body: <p>I'm stuck at home with a rather bad webcam. I was considering upgrading, but then it struck me: phones these days have really good cameras embedded in them. So why not use it as a webcam?</p>
  
  <p>However, as I was researching this further I was really disappointed with the available apps for this. As far as I was able to find, we have Android apps that work roughly as follows:</p>
  
  <ul>
  <li><p>Present phone camera as a network attached camera. Then you can use local software to use that feed as a webcam. See e.g., <a href="https://play.google.com/store/apps/details?id=com.pas.webcam" rel="noreferrer">IP Webcam</a>. This may be sufficient, but it's a complicated setup, and network latency makes this far from ideal.</p></li>
  <li><p>The Android app sends the camera feed to an custom host application that in turn creates a virtual web camera. See e.g., <a href="https://play.google.com/store/apps/details?id=com.dev47apps.droidcam&amp;hl=en" rel="noreferrer">DroidCam</a>. This mostly solves the latency problem, but it is still rather complicated, and requiring us to install a specific third party application is troublesome in regard to user privacy. Especially since the applications are closed source.</p></li>
  </ul>
  
  <p>So, I took the engineering approach and tried to see if it was even possible to improve the situation. As far as I was able to find, Android supports being used as a custom USB <a href="https://developer.android.com/guide/topics/connectivity/usb" rel="noreferrer">accessory</a>. And looking over the USB video class <a href="https://www.usb.org/document-library/video-class-v15-document-set" rel="noreferrer">documentation</a>, it strikes me that it <strong>should</strong> be possible to create an Android app that presents the phone as a generic UVC webcam, such that we do not have to resort to tricks such as the ones above.</p>
  
  <p>Ideally, I would have liked Android to add another USB device option ("Use USB connection as webcam") in addition to debug mode, file-transfer, etc. This seems quite unlikely to happen in the short term however.</p>
  
  <p>So, my question is this: Does an application that does the above already exist? My searching thus far haven't yielded any results, but I might be missing something as googling for this turned out a bit harder than I expected.</p>
  
  <p>Alternatively, am I wrong in my assumption above, such that there is some fundamental issue why an Android application cannot be made to work in that way? </p>