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
Update:
Found and built UVCCamera library and using the build output (libuvccamera-XXX.aar) finally created an AAR binding library.
Example app coming soon...
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.
Hi, did you succeed to bind this library (UVCCamera) ?
I would like to display the video take by an medical camera (dental endoscope...)
Any help would be appreciated ! Ty in advance
Hello
Actually I have problems with that separate repository. It is required, but there are some binding errors which I am not able to fix.
In the meantime you can try this app.
Progress update #2:
Finally I was able to bind both AAR libraries (this and this) in Xamarin!
But now there is a problem in the test Android application: During build it fails with an error which together with solution is described here. So that error was solved.
But unfortunately when I try to start deployed application on my smartphone, it fails with following error:
Any idea anybody? If somebody is interested in this topic, I can upload to github what I did so far.
Progress update #2:
Finally I was able to bind both AAR libraries (this and this) in Xamarin!
But now there is a problem in the test Android application: During build it fails with an error which together with solution is described here. So that error was solved.
But unfortunately when I try to start deployed application on my smartphone, it fails with following error:
Any idea anybody? If somebody is interested in this topic, I can upload to github what I did so far.
Did you ever make additional progress on this? I'm interested!
> Did you ever make additional progress on this? I'm interested!
Currently I am trying another way:
Build libusb and libuvc for Android then create a C# wrapper around libuvc.
So for I was able to build libusb which is required by libuvc.
could you please share .aar libraries or code in github if this available and what is the progress you reached.
Hello
I had no real progress, because of binding library (AAR) compile issues.
Github repository:
https://github.com/saki4510t/UVCCamera/
Dependency AAR library, the latest v6.8.6:
https://github.com/saki4510t/libcommon/tree/master/repository/com/serenegiant/common/6.8.6
BR,
Ladislav
Any update on above ?