Comments (2)
Hi,
Thank you for providing feedback.
As I know some old devices with old Android never send attach
event to app defined broadcast receiver but I think most of ATOM devices will work. Does your app start when you connect UVC camera to your device?
FYI,
- When app defines intent filter in it's AndroidManifest.xml to request attach event so that app can get permanent permission, Android system launches the app and send intent to main activity(instead of broadcast receiver) when user connects UVC device and gives permission.
- When app register USBMonitor, USBMonitor registers it's broadcast receiver to Android system.
As I mentioned, some old devices with old Android never sendattach
event to broadcast receiver and I don't add intent filter for 'attach' event to this broadcast receiver and use polling method instead to avoid race condition. But you can try to addattach
intent filter so that broadcast receiver listen the event by addingfilter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED);
toregister
method. - USBMonitor post
mDeviceCheckRunnable
inregister
method to detect UVC device(s) periodically using polling method. This will cause race condition if you add intent filter forattach
event andonAttach
will be called multiple times(may be called on arbitrary thread). You need to access UVC device exclusively or remove either intent filter ormDeviceCheckRunnable
. mDeviceCheckRunnable
checks number of connected USB device(s) with applying device filter and callsonAttach
if number of connect USB device increase. And then post itself for next check.
saki
from uvccamera.
Hi Saki,
"Does your app start when you connect UVC camera to your device? " Yes this does happen,
I have not had a chance to try your other suggestions. I upgraded from my Acer tablet to a RCA Viking Pro 10.1 tablet since it has two USB ports. I have not had a chance to investigate the use of these ports since I can not get the Google USB driver to work on my PC with this tablet.
from uvccamera.
Related Issues (20)
- Is it possible to set breakpoint in *.c file for trace code?
- Unable to exit the app, always in the background
- No camera connect, call connect;nativeConnect return 0
- Android 13 issue. HOT 6
- pthread_mutex_lock called on a destroyed mutex
- How to compile this code in Android Studio Flamingo | 2022.2.1
- A patch for USBMonitor.java to avoid crash in USB 3.0 HUB
- Working with FLIR Boson camera
- jpeg_read_scanlines crash
- java.lang.RuntimeException: Unable to start activity ComponentInfo : java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity HOT 1
- How to make zoom of texture ( input frames of camera) in UVCCameraTextureView ? HOT 1
- After multiple attempts to open the UVC camera, it fails to reopen. Assistance is requested HOT 2
- Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.serenegiant:common:2.12.5.
- The preview freezes when you press record on the Samsung a54 HOT 1
- MediaRecorder instead of MediaEncoder
- [Security] libjpeg-turbo used in this project is vulnerable
- Can't get started HOT 1
- Android11, RK3568, null pointer dereference HOT 2
- Permission pop-up giving illegal agruement exception in TargetSdk>27
- SQ 29 Camera does not display image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uvccamera.