Android app (Kotlin, Jetpack Compose) that shows a USB (UVC) microscope or HDMI capture card on a tablet over USB-OTG. History, decisions and status are in microscope-viewer-design-doc.md.
The app needs a patched copy of libuvc from
ernestp/AndroidUSBCamera,
cloned next to this folder (not inside it, and with no spaces in its path):
parent/
AndroidUSBCamera/ <- the library clone
Microscope_Cam_Android/ <- this repository
From parent/:
git clone --branch 3.6.0 https://github.com/ernestp/AndroidUSBCamera.git
git -C AndroidUSBCamera apply ../Microscope_Cam_Android/patches/libuvc-bulk-streaming.patch
git -C AndroidUSBCamera apply ../Microscope_Cam_Android/patches/libuvc-replug-attach.patch
git -C AndroidUSBCamera apply ../Microscope_Cam_Android/patches/libuvc-build-paths.patch
Then, with Gradle 8.13, JDK 17 or newer and Android NDK 28.1.13356709:
gradle -p AndroidUSBCamera :libuvc:assembleRelease
gradle -p Microscope_Cam_Android :app:assembleDebug
Each folder needs a local.properties pointing at your Android SDK
(sdk.dir=...).
The app's own code is released under the MIT License.
The built app also contains third-party libraries under their own licenses,
including the LGPL (libusb, LAME); see
THIRD_PARTY_NOTICES.txt. The files in patches/
change third-party source and follow the license of the file they change: BSD
for libuvc's stream.c, Apache 2.0 for USBMonitor.java and
Application.mk.
This software is based in part on the work of the Independent JPEG Group.