Hello,
I'm building a home automation server based on an Android box. This box is connected to a micro-processeur via a serial link to serve some specific functions.
I would like to have a full automated start procedure of the server, particulaly regarding the request permission dialog for the usb serial device.
I done the following:
-1- adding the following lines to the xml manifest:
AddActivityText(main, <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" />)
-2- creating a device_filter.xml in the res folder, its containt is
<?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" />
<!-- 0x07D2 / 0x067B: PL2303 -->
<usb-device vendor-id="2002" product-id="1659" />
</resources>
At first start of my server I get the permission dialog box and I checked the default parameter option in the dialog box
After that everything is ok even if I restart my application there is no more dialog box.
But this will not allow to have a full automated start of my server (box and app)
What can I do to start my server whitout having the request permission dialog box?
Thanks by advance for you help (I know this question has already been asked ...)
Sorry for my english, that's my mother language ...
I'm building a home automation server based on an Android box. This box is connected to a micro-processeur via a serial link to serve some specific functions.
I would like to have a full automated start procedure of the server, particulaly regarding the request permission dialog for the usb serial device.
I done the following:
-1- adding the following lines to the xml manifest:
AddActivityText(main, <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" />)
-2- creating a device_filter.xml in the res folder, its containt is
<?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" />
<!-- 0x07D2 / 0x067B: PL2303 -->
<usb-device vendor-id="2002" product-id="1659" />
</resources>
At first start of my server I get the permission dialog box and I checked the default parameter option in the dialog box
After that everything is ok even if I restart my application there is no more dialog box.
But this will not allow to have a full automated start of my server (box and app)
What can I do to start my server whitout having the request permission dialog box?
Thanks by advance for you help (I know this question has already been asked ...)
Sorry for my english, that's my mother language ...