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

Recognition speed is a bit slow on some devices #132

Closed
shiv19 opened this issue Jan 24, 2018 · 19 comments
Closed

Recognition speed is a bit slow on some devices #132

shiv19 opened this issue Jan 24, 2018 · 19 comments

Comments

@shiv19
Copy link

shiv19 commented Jan 24, 2018

Issue reported by @Zeeshan

Recognition speed is pretty fast on Samsung devices,
but on some devices, it is either slow or doesn't work at all.

The type of barcode we're trying to scan is CODE_128

One problematic phone, we changed the mode from portrait to landscape, it started working better and faster, but still not as good as on Samsung (it's not the phone issue as other barcode scanners in market work equally good across all these phones.)

@EddyVerbruggen
Copy link
Owner

Please add the barcode you're scanning so I can test this. Although I only have 1 non-Samsung device.

@zeesulehria
Copy link

@EddyVerbruggen
Copy link
Owner

@zeesulehria yeah those work fine on my Samsung S8. So what specific devices do you have trouble with?

@zeesulehria
Copy link

@EddyVerbruggen its QMobile Z12 Pro, Android version 6.0
@shiv19 also tested on some phone where he found scanner to perform slower than ZXing android demo

@EddyVerbruggen
Copy link
Owner

OK, but I don't have that model so how do we proceed?

@shiv19 what model is "some phone". And what barcodes did you test?

@shiv19
Copy link
Author

shiv19 commented Jan 25, 2018

It was slow on my Samsung Galaxy J7 [2015 edition], running Android 6.0.1,

And worked fine on my Samsung Galaxy Note 5 [2015 edition], running Android 7.0

@zeesulehria
Copy link

zeesulehria commented Jan 26, 2018

@EddyVerbruggen - Considering the frequency of problem, if you can try on few different phones you might be able to find some phone on which scanner doesn't work or performs slower (it also works slower on some samsung devices, probably with android 6? I also faced problem on some samsung devices, while on others it works pretty fast).
I can also provide you logs from QMobile Z12 Pro if it helps to debug the issue. On QMobile Z12 Pro, it mostly doesn't work at all (changing mode from portrait to landscape made slight improvement).

@EddyVerbruggen
Copy link
Owner

At this point it's not clear if it's an Android 6 (and below?) issue, or a hardware issue, or both. I have 3 Android devices running Android 7 or 8 and it all works fine. So I hope others can comment here as well.

@zeesulehria I assume you're limiting scanning to only the type of barcode you want to be recognized?

@zeesulehria
Copy link

@EddyVerbruggen - I had a thing, sorry for late reply.
One of the SAMSUNG devices that works perfectly fine runs on Android 6.0.1. It shows its not Android version issue. Also, ZXing demo app works perfectly fine on same device hardware on which this plugin shows issue.
@shiv19 mentioned this plugin is based on older ZXing version, so I have a feeling it might be the issue. Alternatively, it can be some bug in plugin logic manifesting in some devices.

On how to proceed further, person debugging the problem must have a device on which this plugin shows issues. Perhaps, @EddyVerbruggen can try to find such phone, or @shiv19 already have a phone which shows the issues. Once the right person to debug the issues has the phone, it would be way to proceed further. May be we should consider ZXing version upgrade if that can be an issue.

@EddyVerbruggen
Copy link
Owner

It could also be one of the modifications I had to add in the past to this plugin. Like you said, it’s impossible to tackle this without a problematic device.

@zeesulehria
Copy link

@EddyVerbruggen - If you are not able to arrange a device like Samsung Galaxy J7 [2015 edition] (which @shiv19 outlined as problematic), perhaps I can ship you the phone QMobile Z12 Pro, on which it has more severe problem?

@zeesulehria
Copy link

@EddyVerbruggen - Can I go past that modification in plugin you mentioned, to check if that change caused the issue?

@EddyVerbruggen
Copy link
Owner

That would mean you'd have to remove a bunch of code from the library. Pretty hard job. Perhaps it's easiest to just replace the modified lib with the latest jar that can be downloaded (instructions). And if that works, add anything missing to that.

@zeesulehria
Copy link

@EddyVerbruggen - Ok I and @shiv19 will try out your suggestion, and let you know.

@zeesulehria
Copy link

@EddyVerbruggen - We are thinking to try an older version of plugin which doesn't have potentially problematic changes you suspect might have caused issue.
Which plugin version would you recommend to try out?

@EddyVerbruggen
Copy link
Owner

To start with, 1.3.1 and 1.4.0 would be good candidates.

@juliancesar
Copy link

@zeesulehria, did you get performance improvements with this downgrades?

@zeesulehria
Copy link

@juliancesar - I couldn't get this done and had to postpone. If you are able to try it out, let me know. This would be good to try out.

@EddyVerbruggen
Copy link
Owner

For anyone not satisfied with the performance of this plugin for your usecase, please try ML Kit in nativescript-plugin-firebase.

It's a completely different implementation and IMO very fast. Also, you can embed the scanner UI on your page (doesn't need to be fullscreen), allowing you to add your own UI elements on top of the scanner view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants