-
Notifications
You must be signed in to change notification settings - Fork 18
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
Multiple page print crashes App #5
Comments
@samoka , have you found any solution to this issue? |
@arcadius Unfortunately not, and it seems to happen more on Android devices. |
My general advice on this point is that (inside plugin) it’s best to do “startCommunication” and “endCommunication” only ONCE and print ALL images in between. Repeatedly opening and closing the port back to back (for each label) is likely to cause problems. The v4 SDK provides API to print an array of image URLs. However changing this plugin to use v4 APIs instead of v3 will be a significant effort. It may be worthwhile to add an API to the plugin that takes an array of URLs and handle it yourself with v3 (or v4) APIs. (NOTE: passing array of URLs instead of base64 images is much better on memory and less likely to cause memory problems). All that said, it seems to me this would be happening a lot with this plugin where more than 1 image at a time is printed, but reports of this issue seem to be rare. So maybe there’s another explanation? Sorry, i dont the answer other than what i said above. |
thanks @robr2112 for the input. |
Yes i know you’re linking the v4 SDK (for ios anyway). However internally your code is still using v3 APIs (which is fine since v4 is backward compatible to v3). Eventually (not any time soon), the v3 APIs will be deprecated and removed in future SDK releases. Now, some v3 APIs are still required because not all v3 features are supported with v4 APIs. So we recommend migrating to v4 APIs eventually, but at your own pace depending on what features you need. |
Another reason the crash might be happening could be due to a memory problem in the app that i mentioned in earlier response….if the array contains base64 images instead of URLs (files). Maybe try loading only 1 image at a time into memory and then “release” the memory before trying the next one. This might be a solution. |
Thanks for a great plugin!
I'm looping over some array and calling printLabel multiple times to print stickers, only the last call seems to succeed and then my App crashes. Any idea why that is? or I'm I doing something wrong?
The text was updated successfully, but these errors were encountered: