biometrics Active Member Licensed User Longtime User May 9, 2019 #1 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?
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?
agraham Expert Licensed User Longtime User May 9, 2019 #2 I stand to be corrected but as far as I know 1) No 2)Yes Upvote 0
Erel B4X founder Staff member Licensed User Longtime User May 10, 2019 #3 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). Upvote 0
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).
biometrics Active Member Licensed User Longtime User May 10, 2019 #4 Erel said: 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). Click to expand... 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
Erel said: 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). Click to expand... 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.