getPrinterStatus - no errors on iOS
When I'm calling getPrinterStatus from iOS I don't seem to be able to get the ERROR_WRONG_LABEL or ERROR_NOT_SAME_MODEL errors without trying to actually print something.
Android is fine but the same code on iOS is returning ERROR_NONE when I know that the label index or model don't match the set PrinterInfo.
Is this a bug or an iOS limitation?
The use case is that I'm trying to ease the set up of the printer for a first time user. I'm looping the labels and models I care about to try and match them to the printer so that they don't need to be set up manually for printing to work. I want to tap on a Net or BT printer from a list and a loop to go and match up the PrinterInfo values to the selected printer through trial and error. it's working great for Android but iOS is always getting ERROR_NONE from getPrinterStatus().
Hi @lukesalter ,
Thanks for reaching out about this. I took a quick look at the iOS side and it does seem that the Brother SDK handles things very differently from the way their Android one does so as a result we are returning that ERROR_NONE.
However, while their SDK does not seem to expose the errors on the iOS side like on Android they do seem to expose the raw data https://support.brother.co.jp/j/s/support/html/mobilesdk/reference/ios_v4/brlmprinterstatus.html#brlmprinterstatusrawdatastructure so let me take a look at it later tonight and let you know what I find.
Thanks again for reaching out about this,
Hi @lukesalter ,
After taking a look at their raw structure it doesn't seem to return any values when the getPrintStatus gets called. So for the time being on iOS the only way to get a proper status is by calling print first.
I'll leave this open in case we find any way to improve this in the future.
Thanks again,
Ah that's a shame - is there any way I can get access to the currently set printer label or model using the SDK without attempting a print? I don't really want to action a print on setup but if I have to then I guess I will!
Churning out a 'Setup successful' label wouldn't be the end of the world as a last resort.
Hi @lukesalter ,
Yes, you may get information about which label is in the printer using getLabelInfo method, though this will only work on QL and PT printers according to the Android docs if I remember correctly.
We don't currently have it supported on the iOS side of another_brother but I do see there seems to be a similar method on the Brother iOS SDK that we might be able to leverage.
getCurrentLabelParam
Get label/paper information of connected your printer.
https://support.brother.com/g/s/es/htmldoc/mobilesdk/reference/ios/brptouchlabelparam.html
So let me take a look at it later tonight and see if it's supported on the current iOS SDK version we got and will let you know how it goes.
Hi @lukesalter ,
Apologies for the late response on this. After investigating further it seems that getCurrentLabelParam and getLabelInfoStatus are from the v3 version of the iOS lib which don't currently have a straight forward way to integrate with the v4 version we currently have in another_brother. So getting the label info supported on iOS might take some time.
I'll leave this open until we find a good way to resolve it. Thanks again for reaching out about this.