[TIMOB-26743] Ti SDK not able to recognize usb-device tag. Making it disappears after build
GitHub Issue | n/a |
---|---|
Type | Story |
Priority | None |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2019-11-07T17:33:48.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Motiur Rahman |
Assignee | Unknown |
Created | 2019-01-17T16:40:04.000+0000 |
Updated | 2019-11-07T17:33:48.000+0000 |
Description
I have created xml file in platform/android/res/xml/device_filter.xml (refer to the first screenshot) but in not get applied after building an App.
device_filter.xml (in platform/android/res/xml/device_filter.xml)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- 0x0403 / 0x6001: FTDI FT232R UART -->
<usb-device vendor-id="1027" product-id="24577" />
<!-- 0x2341 / Arduino -->
<usb-device vendor-id="9025" />
<!-- 0x16C0 / 0x0483: Teensyduino -->
<usb-device vendor-id="5824" product-id="1155" />
</resources>
After building the Appcelerator project, it becomes blank in the build folder. (refer second screenshot)
<?xml version="1.0" encoding="UTF-8"?>
<resources>
</resources>
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
Please find below download link for test code
- https://we.tl/t-UafUiEAun1
You can check device_filter.xml in Platform folder.
And after building the project it becomes blank in build folder.
The functionality I have to achieve is
1) When I connect the specific device to USB port of android box(mentioning its vendor id , product id in Xml file)
then it's not asking permission again & again for device connection.
Otherwise, it's asking me for permission again & again.
We tried this with native, it is working as per expected but in Appcelerator, it's not working because it is not processing xml file in XML folder.
Thanks!
Attachments
File | Date | Size |
---|---|---|
first.png | 2019-01-17T16:37:31.000+0000 | 9767 |
second.png | 2019-01-17T16:37:32.000+0000 | 67778 |
Hello, I was able to verify the issue with the sample code provided. During build the xml file becomes blank in the build folder. What seems to be the issue here? Tested in Android with SDK 7.5.0.GA. Thanks.
issue is usb-device tag become blank after build . due to which my connected usb devices is not getting auto permission. it asking me permission again again after each device launch in appcelerator. In native, with above code usb-device tag not becoming blank. Usb connected device will get auto permission & not asking me permission again & again device_filter.xml is contain vendor id & product id device. as per android functionality. This devices become whitelist for my app then it should not asking permission again & again. but in applecelerator, this usb-device tag are not processing during build and it become blank after build. hence this usb device not become whitelist for app & asking permission again & again. @Sharif AbuDarda ad