Hi,
Scenario: Android 7, felUsbserial and Usbmanager libraries.
Android keeps asking permission to access the usb device when: (I've select the option "use by default for this USB device")
Is there a way to configure/code that Android will not ask permission again even after a android restart and unplug and Plug the USB?
I've tried the following:
Regards!!!
Scenario: Android 7, felUsbserial and Usbmanager libraries.
Android keeps asking permission to access the usb device when: (I've select the option "use by default for this USB device")
- Android restart
- Unplug and Plug the USB
- Turn off and turn on the USB Device
Is there a way to configure/code that Android will not ask permission again even after a android restart and unplug and Plug the USB?
I've tried the following:
- I'm using Erel's example: felUsbserial
- Manifest Intent filters
B4X:
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" />)
AddActivityText(main, <intent-filter>
<action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
</intent-filter>
<meta-data android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED"
android:resource="@xml/device_filter" />)
CreateResource(xml, device_filter.xml,
<resources>
<!-- 0x0403 / 0x6001: FTDI FT232R UART -->
<usb-device vendor-id="29987" product-id="29987" />
</resources>
)
Regards!!!
Last edited: