-
Notifications
You must be signed in to change notification settings - Fork 180
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
Crash with Android 6 Marshmallow? #50
Comments
I found the same thing on an Nexus 5x with Android 6.0.1, and it seems to be because it needs a 64 bit version of zbar. I've followed the steps suggested in the top answer here: |
@uniphonic what is the new error? |
I'm sorry for imprecision, my phone is also Nexus 5x with Android 6.0.1. I changed my first message. |
@dcousens We found the problem was a permissions issue, after we had added the 64 bit versions of the libraries, as mentioned. The problem is that for Android 6.0 devices do not automatically accept sensitive permissions at install time. Instead they are accepted at run-time. By default, sensitive (also known as dangerous) permissions, such as the camera, are not allowed, even if they are requested in the manifest file. One fix for the permissions issue would be to request the permission in code manually during the runtime of the app in order to activate the scanner. This way would require a code change to the native Java code within the ZBarcodeScanner class. However, this new permissions rule only applies when the app is target at an targetSdkVersion of 23, so setting the version lower would be another way to solve the permissions issue. Setting that target lower causes the app to behave as it used to, and will automatically allow the camera permission when the app is installed. I will try to commit what we've got working, after we do some more testing with it. One thing we've noticed is that the camera image seems to be upside down on the Nexux 5x, but that doesn't seem to affect the scan, and it seems to show up that way on the some other scanning software, so it could be more of a hardware issue. Will have to do some more investigation. [Update] Looks like the upside down image is partially a hardware issue: |
Thanks for report! let us know when you fix the bug to update the apps. |
…es, such as the Nexus 5x. Fixes issue # 50 tjwoon#50
OK, i've got the fix committed to my fork:
@dcousens I noticed you had some concerns with pull #39, and I'm guessing you might have the same concerns here, since additional .so files are being added, in addition to the ones from pull 39. If you have any ideas on how to alleviate your concerns, please let me know? The files added from commit 39 don't seem to be much difference in size from the previous version, and they still seem to work, so it didn't seem so likely that something could be wrong with them. For the .so files that I added, they are from the repository mentioned on the StackOverflow article mentioned above ( https://github.com/SkillCollege/ZBarAndroidSDK/tree/master/ZBarScanProjAll/libs ). |
I tested on Nexus 5 with Android 6.0.1 and it's working fine. Thanks so much! |
@ilvalerione I also have the same issue right now. Can you please tell me what fork#commit you tried and verified working? |
uniphonic fixed this bug and committed new code in this new fork: |
@ilvalerione Thanks for your prompt reply. int permissionCheck = ContextCompat.checkSelfPermission(this.getBaseContext(), Manifest.permission.CAMERA); |
Are you using PhoneGap build service? |
No, I am just using ionic-cli |
my experience is on PhoneGap build service... i don't know for ionic cli |
Ah, got it. Thanks. |
I'll just need to go over the build process myself, and hopefully come up with the same deterministic hash. |
@dcousens I didn't try compiling the .so files my self, I just got the one that I added from this repo: |
…es, such as the Nexus 5x. Fixes issue # 50 #50
…es, such as the Nexus 5x. Fixes issue # 50 #50
…es, such as the Nexus 5x. Fixes issue # 50 #50
I also have a crash on 6.0.1 with a Nexus 5... The exact error from logcat is:
Looking at the libs folder arm is not present... |
I will check this weekend but looking at the stack-trace that I sent, I doesn't seems to be linked to a permission. |
@Gp2mv3 try disabling |
@dcousens This stack-trace is from Android. Bitcode is for iOS right ? I have no problem on iOS, even with Bitcode enabled. |
True. ping @rubensayshi ? |
* uniphonic_csZbar_master: Version updated adding support lib to plugin.xml Wrapping some code in try catches, so they don't fail on older devices. Samsung Tab 4 was crashing because it didn't have a flash or autofocus. Increasing the autoFocusInterval, so that it allows slower devices such as the Galaxy S3, to finish focusing before it tries to refocus. Before this change it was appearing as if the autofocus wasn't working at all, because it kept resetting the focus before it got a chance to focus. - fixing orientation of camera viewport for Android Nexus 5x devices Adding files for Android 6 Marshmallow compatibility and 64 bit devices, such as the Nexus 5x. Fixes issue # 50 tjwoon#50 Added button bar for iOS Camera Flash icon added Icon Updated Android barcode layout changes Status bar hided in camera view Fix to main application android manifest file Update README.md Removed button black background Change on flash button style, icon and position UI adaptation on orientation Button to activate flash README: remove quirk, now fixed Resolve alternating flash during autofocus
Hi, any news about the new release ? I have the same issue with some customers who upgrade to android 6 |
have problem with cam access in version 6. sometime it works, sometime not. i don't always see the cam permmmission dialog after delete cache, data & reinstalltion.ö |
Maybe there is a relation between that?? |
I installed my app on a Nexus 5x with Android 6.0.1 but when i call this plugin to open scanner the app go shoutdown.
Someone knows this problem?
The text was updated successfully, but these errors were encountered: