Browse Source

Update README.md

update to 2.3.0
main
蒋东国 6 years ago
committed by GitHub
parent
commit
b414ee9896
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      README.md

22
README.md

@ -2,6 +2,8 @@ AndroidUSBCamera
============
AndroidUSBCamera is developed based on the [saki4510t/UVCCamera](https://github.com/saki4510t/UVCCamera), the project of USB Camera (UVC equipment) and the use of video data acquisition are highly packaged, and it can help developers using USB Camera devices easily by a few simple APIs. By using AndroidUSBCamera,you can detect and connect to a USB Camera simply.And you also can use it to realize taking picture,recording mp4,switching resolutions ,getting h.264/aac/yuv(nv21) stream and setting  camera's contrast or brightness,supporting 480P、720P、1080P and higher,etc.
Supporting Android 5.0,6.0,7.0,8.0,9.0
[中文文档: AndroidUSBCamera,UVCCamera开发通用库](http://blog.csdn.net/andrexpert/article/details/78324181)
Usage
@ -21,7 +23,7 @@ allprojects {
Step 2. Add the dependency
```java
dependencies {
implementation 'com.github.jiangdongguo:AndroidUSBCamera:2.2.8'
implementation 'com.github.jiangdongguo:AndroidUSBCamera:2.3.0'
}
```
### 2. APIs Introduction
@ -150,10 +152,26 @@ mCameraHelper.updateResolution(widht, height);
```
![Connecting gif](https://github.com/jiangdongguo/AndroidUSBCamera/blob/master/gifs/2.1.0.gif)
At last,remember adding permissions:  
```
```xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
```
### 3. Solving Problems
1. connected,but preview failed
Please checking your preview format and change YUV to MJPEG or MJPEG to YUV,because some usb devices only supporting YUV
2. never found the device
- confirm your phone support otg
- get a file from your sd card named failed-device.txt in the path of root sd card/UsbCamera/failed-device.txt and tell me
Other Library about Android Camera
-------
[OkCamera](https://github.com/jiangdongguo/OkCamera) Android Camera univsersally operation.

Loading…
Cancel
Save