Integrate usb-serial-for-android library into the project
parent
d7752fe5f9
commit
c50c4930ff
|
@ -26,6 +26,7 @@ version = "1.0"
|
|||
|
||||
allprojects {
|
||||
repositories {
|
||||
maven { url 'https://jitpack.io' }
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ dependencies {
|
|||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation 'com.google.android.material:material:1.2.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'com.github.mik3y:usb-serial-for-android:3.3.0'
|
||||
|
||||
testImplementation 'junit:junit:4.13.1'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
|
|
|
@ -16,9 +16,12 @@
|
|||
<activity android:name=".MainActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<meta-data
|
||||
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
|
||||
android:resource="@xml/device_filter" />
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- 0x0403 / 0x60??: FTDI -->
|
||||
<usb-device vendor-id="1027" product-id="24577" /> <!-- 0x6001: FT232R -->
|
||||
<usb-device vendor-id="1027" product-id="24592" /> <!-- 0x6010: FT2232H -->
|
||||
<usb-device vendor-id="1027" product-id="24593" /> <!-- 0x6011: FT4232H -->
|
||||
<usb-device vendor-id="1027" product-id="24596" /> <!-- 0x6014: FT232H -->
|
||||
<usb-device vendor-id="1027" product-id="24597" /> <!-- 0x6015: FT230X, FT231X, FT234XD -->
|
||||
|
||||
<!-- 0x10C4 / 0xEA??: Silabs CP210x -->
|
||||
<usb-device vendor-id="4292" product-id="60000" /> <!-- 0xea60: CP2102 and other CP210x single port devices -->
|
||||
<usb-device vendor-id="4292" product-id="60016" /> <!-- 0xea70: CP2105 -->
|
||||
<usb-device vendor-id="4292" product-id="60017" /> <!-- 0xea71: CP2108 -->
|
||||
|
||||
<!-- 0x067B / 0x2303: Prolific PL2303 -->
|
||||
<usb-device vendor-id="1659" product-id="8963" />
|
||||
|
||||
<!-- 0x1a86 / 0x?523: Qinheng CH34x -->
|
||||
<usb-device vendor-id="6790" product-id="21795" /> <!-- 0x5523: CH341A -->
|
||||
<usb-device vendor-id="6790" product-id="29987" /> <!-- 0x7523: CH340 -->
|
||||
|
||||
<!-- CDC driver -->
|
||||
<usb-device vendor-id="9025" /> <!-- 0x2341 / ......: Arduino -->
|
||||
<usb-device vendor-id="5824" product-id="1155" /> <!-- 0x16C0 / 0x0483: Teensyduino -->
|
||||
<usb-device vendor-id="1003" product-id="8260" /> <!-- 0x03EB / 0x2044: Atmel Lufa -->
|
||||
<usb-device vendor-id="7855" product-id="4" /> <!-- 0x1eaf / 0x0004: Leaflabs Maple -->
|
||||
<usb-device vendor-id="3368" product-id="516" /> <!-- 0x0d28 / 0x0204: ARM mbed -->
|
||||
</resources>
|
Loading…
Reference in New Issue