Credntia / MVBarcodeReader

A Barcode scanner library for Android. Uses the Google Play Services' mobile vision api for barcode detection.
Apache License 2.0
68 stars 22 forks source link

Camera aspect is not as default one.its obnormal #7

Closed rajkumaranbu94 closed 7 years ago

rajkumaranbu94 commented 7 years ago

In android version 6.0,Permission requires to open the camera,after accept the permission,camera screen open with obnormal aspect ratio.This is happen only after accepting the permission for open camera.i am using activity,intent to camera screen. Sample code used to access camera:- new MVBarcodeScanner.Builder() .setScanningMode(MVBarcodescanner.) .setFormats(mFormats) .build() .launchScanner(this, REQ_CODE); Normal Camera Scan normal Obnormal Camera Scan obnormal

rajkumaranbu94 commented 7 years ago

Camera is looking like by using some lens to see the pictures.

iamMehedi commented 7 years ago

Cannot reproduce it. Which device are you on? Are you using the latest version of the library?

rajkumaranbu94 commented 7 years ago

@iamMehedi Yes i m using latest version 1.0.7,and device which i was using to test MotoG(android 6),Mi (android 6),Lenovo k3(android 6).i just think that it only happen in android version 6.

rajkumaranbu94 commented 7 years ago

And one more thing,its only happen after accepting the permission,dialog rise to ask to access your camera before that one snackbar also display with permission message and 'Ok' button.Issue occurs for me when accept permission to access camera that's it..After that i close the camera and try to reopen,its work well. Go throught it and try to help me.

iamMehedi commented 7 years ago

I am yet to reproduce it. But for the time being if the camera permission dialog is causing this issue, you can just handle the permission yourself i.e

rajkumaranbu94 commented 7 years ago

By default your library manifest had that permission to open device camera.Even i include permission in my project manifest file.it doesn't works.And also write code before launch the scanner,it won't work. Suggest me some solution i ll try with that we will resolve that issue soon.

iamMehedi commented 7 years ago

try out the latest commit fb81b08 and let me know if it still has the same issue.

rajkumaranbu94 commented 7 years ago

@iamMehedi Issues cleared in one way of approach i.e when i install fresh application,permission dialog appear and accept it,camera opens normally(Snackbar permission not avail in that situation).If i minimize or close the application and change the camera permission in settings(apps-->permissions-->Camera-->unselect permission) and again back to the application and try to access camera its remains same issue(in that situation snackbar appears) i.e In this time both snackbar permission and default permission asking to access camera.Actually the problem arises after snackbar appears screen.

Snackbar ScreenShot snackbarpermission

iamMehedi commented 7 years ago

@rajkumaranbu94 try out the new version 1.0.8, this should be fixed.

rajkumaranbu94 commented 7 years ago

@iamMehedi its work,thank you.