PDF417/pdf417-android

SGS7 Edge Focus issues

skryshtafovych opened this issue · 11 comments

After updating to 5.5.2 users began to experience focus issues on their samsung devices.Our call center has received several calls about users being on Samsung S6 or S7 as-well as if we look at playstore most of bad comment are about focus issues from Samsung Devices.

Hi, please update to latest version (5.2.2 is rather old version). The 5.5.1 version contains autofocus improvement for autofocus on Galaxy S6 and Galaxy S7 devices. Other devices (both Samsung and non-Samsung were not affected with this improvement).

Sorry that was a Typo our Gradle Build
com.microblink:pdf417.mobi:5.5.2

Can you reproduce the issue with our demo app? On our side we get much more robust autofocus performance on S6 and S7 since version 5.5.1 (which included autofocus improvement).

Please note that PDF417 SDK does not have its own autofocus algorithm, instead it uses default provided by device camera. The trick in version 5.5.1 and later was in enabling phase autofocus which is not part of standard android API, but is supported on S6 and S7, whilst not enabled by default (unlike on other devices, like LG G5). We raised that issue with Samsung, but so far they weren't helpful with resolving that issue.

Does the problem persist with version v6.1.0?

v6.0.1 had fixed the issue. Now with release of Nougat has caused some new issues attached is where the app crashes and many users have complained about scanner not working at all.
crashes.txt
https://play.google.com/store/apps/details?id=gov.ca.lot.caLotteryApp

HI @skryshtafovych - is the crash only happening only on SGS7 Edge with Android N? We cannot reproduce it on other Android N devices (Nexus 5X, OnePlus 3 and Motorola MotoZ).

@DoDoENT Its mainly happening on Samsung Devices running N
image
image

Hi @skryshtafovych, thank you for the info. The autofocus issue should already be fixed in our internal codebase, but we haven't been able to reproduce the crash. However, we added some nullpointer checks based stack traces you've sent, but we still cannot gurantee that to be crash-free (the np checks weren't there in the first place because the callbacks in question should not be called more than once by a device camera - however it appears that on Android 7, Samsung devices do that).

We will try to push the bugfix release ASAP.

Hi @skryshtafovych,

we released v6.2.0. Please try with it. As I already said, autofocus fixes for Android 7 Samsung devices should work (we tested with our other app, which has US-based users - we have only European versions of Samsung devices in the office which always worked correctly). For the crashes, I've added some null pointer checks, but I cannot guarantee that it will be completely crash-free (I couldn't reproduce the crash even before the "fix"). Please close this issue if it is solved for you now.

Hey @DoDoENT
I have tried 6.2.0 and it seems like i am still experiencing focus issues on these devices an when scanner works it does not scan correctly many times returning invalid scan results.The google doc.where length =0 means we got invalid results back.Inside also are some barcodes i am having issues with.

What exact issues are you experiencing? What are invalid scan results? I've tried scanning barcodes from linked google doc and they can be scanned without any problems (using the latest SDK).

As I said earlier, in v6.2.0 we disabled PhaseAutofocus feature on Samsung devices. The PhaseAutofocus is a non-standard feature available only when using official Samsung Camera SDK for camera management and enables much faster and more accurate autofocus. However, it appears that this feature, when used from SDK, does not work on US versions of Samsung S7 devices (it works on european and international versions) - instead of making focus much faster and more accurate, it does not focus at all. As a workaround, we disabled that feature and rely on default Android camera API for performing camera focus, which on Samsung works (at least it can focus).

In our development builds, we tried with the latest version of Samsung camera SDK and even with their official demo app, there are autofocus problems when PhaseAutofocus is enabled, and when it is not, focus works the same as with default camera API. On non-US versions of S7 and S7 edge PhaseAutofocus works correctly both with our SDK and with Samsung's official camera SDK.

The focusing problem is obviously related to Samsung devices, as their camera driver seems to be broken on firmwares shipped by some US providers, such as AT&T, T-Com and Verizon. This is something we cannot fix, as we do not have the source code of their firmware. We can only workaround the bugs in their firmware - which we have done in v6.2.0.

We even contacted Samsung about that issue and they only told us not to hold the device less than 15 cm away from object camera is focusing on - which is not very helpful.