-
Notifications
You must be signed in to change notification settings - Fork 39
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
New Android Bluetooth permissions preventing print and port discovery #60
Comments
good discussion of the issue here: and here: |
The crash is probably the same we faced at #48 and fixed at #59 - however, with a new perm request. Upgrading to Android 12 left us in a strange endless loop of search (our fork got a bit outdated, missing a new argument), and fixing that causes an instant error now. Sadly, as you can see, this plugin is abandoned. But you're welcome to try our fork, I'm trying to solve the issue. |
@davidclean were you able to get to a solution, by any chance? Edit: turns out the USB permission issue seems to be mysteriously gone, but right now I'm unable to test bluetooth printers (got none working with me, but a colleague have and will report on this in the near future). |
@igorsantos07 I haven't been able to find a solution yet unfortunately |
@igorsantos07 workaround solution i'm trying is to use this plugin https://www.npmjs.com/package/cordova-plugin-android-permissions before attempting to print or search for printers |
While our fork solved crashes and hangs, in some scenarios permissions were not requested - or we were not able to re-request when possible. I went with a slightly different path of yours - I used https://github.com/dpa99c/cordova-diagnostic-plugin, which has some extra functionalities that could be useful, besides being more detailed on the permission status. It became quite a convoluted function to work out all the scenarios, but it worked well in the end 🤷 Thanks for the pointers! |
When trying to print to Bluetooth using Android 12 or above am receiving an error message that BLUETOOTH_CONNECT permission is required.
Running the following function will result in app crash
starprnt.portDiscovery('All', function (result) {
The text was updated successfully, but these errors were encountered: