External USB webcam plugin for Xamarin.Android

Hi!

Did anybody ever tried to attach external USB webcamera by OTG cable to Android device and take photo or video using this camera?
There are several applications in Play Store which can demonstrate the above, for example this.

After some searching I've found a native library libuvc, which provides all the necessary functionality to reach the above.
My question is wheter it is possible to make by somebody a similar wrapper and nuget package for this library like for example sqlite or UrhoSharp?

They are using the same way to provide the needed functionality in Xamarin: Wrapping a native library into a C# library which can be then easily used in any Xamarin project.

Posts

  • lahellerlaheller USMember ✭✭

    Update:

    Found and built UVCCamera library and using the build output (libuvccamera-XXX.aar) finally created an AAR binding library.

    Example app coming soon...

  • lahellerlaheller USMember ✭✭

    Progress update #1:

    There was a little problem with the original library since in its source code there were missing classes. Author of original library fortunately has these classes in a separate repository, so I only had to add these missing classes and rebuild the whole UVCCamera library. Then create a Xamarin bindings library.

    Now in my test Xamarin app I am able to detect attach/detach of any USB device to smartphone via OTG cable using the UVCCamera library, since it provides such functionality. Next step it detection of attached USB video/camera device and display live preview.

Sign In or Register to comment.