Android Question felUsbSerial specific permissions?

techknight

Well-Known Member
Licensed User
Longtime User
I know there is the HasPermission and RequestPermission function built into the library, but I am trying to specifically find out what the exact android permissions it needs are, does anyone know this? it appears to not be documented.

I am making up a /etc/permissions xml file to throw onto the Android filesystem to hopefully autogrant the permissions this thing needs since the grant dialogbox isnt implimented on this Android box I am working with.

Thanks.
 

agraham

Expert
Licensed User
Longtime User
I know there is the HasPermission and RequestPermission function built into the library
No there isn't! The library implements an instance of UsbManager which does implement the HasPermission and RequestPermission metods. Both of these are methods that accept a single parameter that is an instance of UsbSerial. There is no actual permission to explicitly request access to a USB device.
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
No there isn't! The library implements an instance of UsbManager which does implement the HasPermission and RequestPermission metods. Both of these are methods that accept a single parameter that is an instance of UsbSerial. There is no actual permission to explicitly request access to a USB device.

If that is the case, then why does this fail needing a permission:
1687454220320.png
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
That code looks correct as far as I can remember as it is a long time since I used USB serial devices. I don't know why it fails and can't comment as you don't say in what manner it is failing.
The android device does not support the popup dialog and user input for permission grant.

So I am using root in ADB to try and grant the permission that way, permanently. At least, thats the goal.
 
Upvote 0
Top