Closed mikhael28 closed 1 year ago
This is attempting to print through bluetooth - my device is connected, and is able to see the mac address but printing just doesn't work.
So, I have printing working on Android now - it turns out the error was in fact, not related to permissions - but related to the label that I was setting. I was setting the label as W103, when I should have been setting W103H164. I really wish Brother provided some documentation as to what those labels even mean, I still don't know. I just started brute force checking and that one worked.
I was getting Error code 9999, as per line 281 in BrotherUtils.kt
- it was, erroneously, override the ErrorCode from 'ERROR WRONG LABEL' to 'ERROR_STORAGE_PERMISSION_NOT_GRANTED'. Closing, as it is resolved - now to see if iOS can somehow work, it's not even picking up the bluetooth devices.
Thanks for the report @mikhael28 .
In the case of the BrotherSDK if the permission is not granted on the device the library will notify ERROR WRONG LABEL. That intercept should only take place if we get ERROR WRONG LABEL and the permissions are not granted (https://github.com/CodeMinion/another_brother/blob/main/android/src/main/kotlin/com/rouninlabs/another_brother/method/BrotherUtils.kt#L278)
Could I trouble to share some details about what Android version you are running this on?
Thanks in advance,
The permissions were definitely granted - the only difference was changing the label. compileSdkVersion 33, targetSdkVersion 32, kotlin 1.8.21, gradle android plugin 7.2.2 - FYI plugin 7.4 was breaking for me, so I downgraded to this version.
Running this on Android 10 I believe, for the physical device.
I'm getting basically this exact same issue in the another_brother prime, though I'm using 0.33 on pub.dev. As you can see, I'm inspect the picture to be printed (in the assets folder). I have given the permissions to access the files/storage APIs, however I end up getting a ' {name: ERROR_STORAGE_PERMISSION_NOT_GRANTED, id: 9999}' even though I've granted permission. You can also see at some point that I am in fact connected to the QL-1110NW, before it disconnects upon printing attempt (using the same logic as another-brother-prime's discovery of bluetooth.
Does anyone have any thoughts/quick suggestions as to what is blocking me here?
` E/A-Brother(13675): Printers: [Lcom.brother.ptouch.sdk.NetPrinter;@c2866d4 E/A-Brother(13675): Out Printers: []