Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android USB permissions #59

Closed
wants to merge 7 commits into from

Conversation

zineer
Copy link

@zineer zineer commented Jun 7, 2022

This fixes #58.

Android intent-filters are added to the plugin.xml to allow the application to be listed as an option for opening when a Star printer is connected via USB.

In the event permissions are not granted to the device by the use of the intent-filters, when an action is executed we loop through connected devices and request permissions if a Star printer we don't have permission for is found. Implemented the check and request permission here since permissions need to be re-requested each time the printer is plugged back in, so don't want to be surprised by a lack of permissions at any time.

igorsantos07 and others added 5 commits June 5, 2022 21:13
I was able to include the permission XML that allows any app to "respond" to a just-plugged printer, but......... not more than that. Some changes on the iOS side was done too, but that was easier since it's simply a no-op (and is untested too).
Any Java code I included (even blatantly broken stuff) never caused an issue during compilation or runtime, not more than the current bug causes. No clue how to actually compile the plugin and get it into the debug app.

This is supposed to be a solution for auctifera-josed#58
@zineer
Copy link
Author

zineer commented Nov 16, 2023

Replaced with #62 which supersedes this one by handling bluetooth permissions for Android 12 as well.

@zineer zineer closed this Nov 16, 2023
@zineer zineer deleted the usb-permissions branch March 7, 2024 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android exception: "User has not given «app» permission to access device «bus»"
2 participants