Android Question usb-device always asking permission

mmanso

Active Member
Licensed User
Longtime User
Hi All,

I'm using a USB printer and everytime I boot the android box I get an "authorization" dialog. After "allowing" the usage of the device it don't ask me the same again, until I reboot the machine. Everytime I reboot the machine I get the same question again.

After reading the forum I came up to this to the manifest editor:

B4X:
AddApplicationText(
<activity android:name="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" />
</activity>
)

CreateResource(xml, device_filter.xml,
<resources>
<usb-device vendor-id="4177" product-id="4096"/>
</resources>
)

Even after adding this, I'm allways asked for the permission after I boot the machine.

I'm using Android 10.

Is there any way I never get asked for permission again after the first authorization?

Thanks.
 

mmanso

Active Member
Licensed User
Longtime User
Ok, I'll try to come up with an workaround for it... I've seen some "auto clicker" apps and maybe that could help me out.

Anyway, thanks.
 
Upvote 0
Top