Android Question USB Host avoid check permission dialog

EvgenyB4A

Active Member
Licensed User
Longtime User
I use USB host library to print to USB printer. How to avoid appearance of check permission dialog each time after power on reset of the Android device?
 
in your manifest :

<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>

<intent-filter>
<action android:name="b4a.gkc.weather.action.START" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>


<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />

in files/device_filter specify VID & PID

<?xml version="1.0" encoding="utf-8"?>

<resources>
<usb-device vendor-id="6790" product-id="29987" />
</resources>
 
Upvote 0
in your manifest :

<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>

<intent-filter>
<action android:name="b4a.gkc.weather.action.START" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>


<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />

in files/device_filter specify VID & PID

<?xml version="1.0" encoding="utf-8"?>

<resources>
<usb-device vendor-id="6790" product-id="29987" />
</resources>

Will be the app launched automatically after power on in this case?
 
Upvote 0
remove :
<intent-filter>
<action android:name="b4a.gkc.weather.action.START" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
 
Upvote 0
Back
Top