insightautos / cordova-gmv-barcode-scanner

A Cordova barcode scanning plugin based on the Google Mobile Vision library for iOS & Android.
MIT License
52 stars 77 forks source link

Lock Screen Orientation on Android Tablets #18

Open pjwl33 opened 5 years ago

pjwl33 commented 5 years ago

Hi is there anyway to lock the screen orientation on scanner plugin or at least inherit those properties from the app itself?

Currently rotates the scanner and the dimensions are not always fit to screen (on tablet) even if the application it is a part of has a locked orientation.

Thank you.

forrestmid commented 5 years ago

I’m pretty sure it’s set to lock to portrait regardless of orientation on iOS and Android. What OS are you experiencing the issue on for tablets?

On Mon, Feb 11, 2019 at 10:50 AM, Paul Lee notifications@github.com wrote: Hi is there anyway to lock the screen orientation on scanner plugin or at least inherit those properties from the app itself?

Currently rotates the scanner and the dimensions are not always fit to screen (on tablet) even if the application it is a part of has a locked orientation.

Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [https://github.com/dealrinc/cordova-gmv-barcode-scanner/issues/18] , or mute the thread [https://github.com/notifications/unsubscribe-auth/AHvidQhwqMcU8kScLGQsmX6GoBoL_a3kks5vMa1ZgaJpZM4a0uMg] .

pjwl33 commented 5 years ago

Thanks for getting back to me.

We are experience the rotation on both Android 8.0 and 8.1 OS.

On Feb 11, 2019, at 11:33, forrestmid notifications@github.com wrote:

I’m pretty sure it’s set to lock to portrait regardless of orientation on iOS and Android. What OS are you experiencing the issue on for tablets?

On Mon, Feb 11, 2019 at 10:50 AM, Paul Lee notifications@github.com wrote: Hi is there anyway to lock the screen orientation on scanner plugin or at least inherit those properties from the app itself?

Currently rotates the scanner and the dimensions are not always fit to screen (on tablet) even if the application it is a part of has a locked orientation.

Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [https://github.com/dealrinc/cordova-gmv-barcode-scanner/issues/18] , or mute the thread [https://github.com/notifications/unsubscribe-auth/AHvidQhwqMcU8kScLGQsmX6GoBoL_a3kks5vMa1ZgaJpZM4a0uMg] . — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dealrinc/cordova-gmv-barcode-scanner/issues/18#issuecomment-462463039, or mute the thread https://github.com/notifications/unsubscribe-auth/AEeZdPrMCWyINnwIIsRuwIbxPnDM1G6aks5vMcWUgaJpZM4a0uMg.

forrestmid commented 5 years ago

Looks like the code on android that is supposed to be handling this and forcing it to portrait is here. I did a couple searches and found some StackOverflow answers indicating that the only time you need to do anything special for tablets is when you want to allow the tablet into landscape mode but not allow the phone, so this code should be functioning properly as-is.

I'd start playing with the code around that link above and see if it can be adjusted to fix this landscape orientation issue for Android tablets.

pjwl33 commented 5 years ago

Thank you very much for looking into this!

Sent from a tiny computer in my big ol' hands. Please excuse any errors

On Feb 12, 2019, at 11:09, forrestmid notifications@github.com wrote:

Looks like the code on android that is supposed to be handling this and forcing it to portrait is here. I did a couple searches and found some StackOverflow answers indicating that the only time you need to do anything special for tablets is when you want to allow the tablet into landscape mode but not allow the phone, so this code should be functioning properly as-is.

I'd start playing with the code around that link above and see if it can be adjusted to fix this landscape orientation issue for Android tablets.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.