Android Question USB to Serial Permission

biometrics

Active Member
Licensed User
Longtime User
I've got a Prolific USB to Serial device. I've tried the felUsbSerial library and it works with it.

I understand that as per many things with Android the user needs to give permission for the app to access it. That is fine when running it the first time.

But it seems that after a reboot you need to do it again. Every time you reboot. This is obviously a problem for devices that will be unattended.

So, questions:
1. Is it possible to give permission only once and that it retains this after a reboot?
2. Will the other serial libraries do the same?
 

biometrics

Active Member
Licensed User
Longtime User
Have you added the XML filter (https://www.b4x.com/android/forum/t...e-usb-serial-library.62216/page-2#post-415487) ?

If set correctly it should give your app the permission automatically (at least after the first time).
That works, thanks.

Only oddity is that you have to select the checkbox "Use by default for this USB device" from the permission dialog. Or else it will ask for permission after reboot again. The only drawback I can see is that if you unplug the USB device and plug it in again that it launches the app. I can live with that.
 
Upvote 0
Top