Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(mod) prepare UVCCamera for Android Oreo #443

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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