Skip to content

Conversation

@rwrnet
Copy link

@rwrnet rwrnet commented Feb 16, 2019

Newer version of Android are attaching and mounting an external USB Camera as v4l devices. If one openDevice it, Android first detaches the device and immediately reattaches it under a different identifier. Hence UVCCamera fails to connect.

In order to fix this, this PR listens on ACTION_USB_DEVICE_ATTACHED, tries to detect whether the new device is the one that was intended to be opened and openDevice the new one immediately before Android remounts the v4l device.

In addition, the PR handles some Backward Compat adjustments and also fixes Notifcation handling on UsbCameraTest4 App for Android 8.1+.

Tested successful with devices on Android 5.1 and 8.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant