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

Kindle Fire HDX camera orientation inverted #36

Closed
srowen opened this issue Jan 18, 2014 · 18 comments
Closed

Kindle Fire HDX camera orientation inverted #36

srowen opened this issue Jan 18, 2014 · 18 comments
Assignees
Milestone

Comments

@srowen
Copy link
Contributor

srowen commented Jan 18, 2014

Install BarcodeScanner-4.5.1.apk from the downloads section on a Kindle Fire HDX
Notice that the UI is properly oriented in landscape mode but the camera preview is inverted (up-side-down)

The UI should be properly oriented in landscape mode (as it is) but the camera preview should also be right-side-up.

This issue occurs whether the Kindle's "Auto-Rotate" feature is enabled or disabled.

device-2014-01-15-101638

Ported from https://code.google.com/p/zxing/issues/detail?id=1833

@zakir-hossain
Copy link

It seems I am having similar problems with HTC Wildfire S, Nexus 4, Samsung 10" tabs. Waiting for a solution on this. Thanks

@srowen
Copy link
Contributor Author

srowen commented Jan 31, 2014

I'm waiting for more info from someone with this device. https://code.google.com/p/zxing/issues/detail?id=1833

@ArloL
Copy link

ArloL commented Feb 26, 2014

I can reproduce this with the Samsung Galaxy Tab 2 7.0.

Steps to reproduce:

  1. Enable screen rotation
  2. Flip to the right
  3. Disable screen rotation
  4. Open Barcode Scanner
  5. See screenshot

If bryancal is not reachable anymore I can test with BS+ if you want.

Another interesting behavior is that when you do not disable the screen rotation (step 3) the screen is flipped by 180 degrees:
device-2014-02-26-093908

@srowen
Copy link
Contributor Author

srowen commented Feb 26, 2014

That just looks like a device or sensor problem, right? Android thinks it is in the opposite orientation. Does anyone have a patch to suggest? AFAICT this is specific to the Kindle Fire.

@ArloL
Copy link

ArloL commented Feb 26, 2014

I just tested with my app. The problem is that screen orientation is set to landscape. It should be sensorLandscape.

@srowen
Copy link
Contributor Author

srowen commented Feb 26, 2014

Ah I think you have it. So if you change this value, it works as expected? Yes, there should be no reason to not let it use either landscape or reverse landscape. I'll try it on my own device (not a tablet or Kindle) to make sure it behaves as expected for me too.

@ArloL
Copy link

ArloL commented Feb 26, 2014

What android versions do you support? sensorLandscape was added in API level 9. There is also a userLandscape but a quick search did not reveal what exactly it does.

@srowen
Copy link
Contributor Author

srowen commented Feb 26, 2014

API 15+ so that is fine. It works OK on my phone and I see why it would
help the tablet situation where the natural landscape is not obvious. If it
works for the Fire I will commit it.
On Feb 26, 2014 12:44 PM, "ArloL" notifications@github.com wrote:

What android versions do you support? sensorLandscapehttps://developer.android.com/guide/topics/manifest/activity-element.html#screenwas added in API level 9. There is also a userLandscape but a quick search
did not reveal what exactly it does.


Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-36121002
.

srowen added a commit that referenced this issue Feb 26, 2014
@srowen srowen closed this as completed Feb 26, 2014
@srowen srowen added this to the 3.0.0 milestone Feb 26, 2014
@srowen srowen self-assigned this Feb 26, 2014
@delta62
Copy link

delta62 commented Mar 3, 2014

It appears that this functionality is glitchy on Galaxy Nexus running API level 17. Since the latest update, my handset does this when the device is "upside down":

zxing-upside-down

@srowen
Copy link
Contributor Author

srowen commented Mar 3, 2014

Not sure what to make of that. The app does not set any camera rotation
params and never has:

https://github.com/zxing/zxing/blob/master/android/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java

The only way a working device would do this is if the wrong rotation params
were set, so this looks like a device problem.

Weirdly it may be caused by a different problem with a different camera
param. Try all the workarounds in settings.

On Mon, Mar 3, 2014 at 7:40 PM, Sam notifications@github.com wrote:

It appears that this functionality is glitchy on Galaxy Nexus running API
level 17. Since the latest update, my handset does this when the device is
"upside down":

[image: zxing-upside-down]https://f.cloud.github.com/assets/1361519/2313523/c6fa95e8-a30a-11e3-808b-3709d04aa4e0.png


Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-36550099
.

@ArloL
Copy link

ArloL commented Mar 4, 2014

Could it be solved using Camera.setDisplayOrientation?

@srowen
Copy link
Contributor Author

srowen commented Mar 4, 2014

I guess the point is, without calling that, it should never be in anything
but the natural orientation. That method is not called.

As a workaround, maybe that overrides it. But I suspect there is a deeper
problem, that the driver is failing to accept configuration that it says it
accepts. So the init is messed up.

This is not an app issue. To continue this, I'd have to see a proposed
workaround that does not affect other devices. Anything that affects
correct functioning of other devices to work around this is a non starter.

On Tue, Mar 4, 2014 at 2:26 PM, ArloL notifications@github.com wrote:

Could it be solved using:
https://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)


Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-36628390
.

@delta62
Copy link

delta62 commented Mar 6, 2014

You're right about this being a device issue.

I'm seeing the same problem with Galaxy S3 and Galaxy S4 handsets. Both phones are running API level 18.

@veenakatdare
Copy link

has anyone resolved this?

@delta62
Copy link

delta62 commented Apr 11, 2014

Yes, this was patched and updated on the Play Store sometime around the 19th of March.

@SyedWasiHaider
Copy link

This is still an issue.

@judax
Copy link

judax commented Apr 15, 2015

I am developing a camera handling library myself and I can confirm this is an issue on the Kindle Fire HDX 10. I also have the BarCodeScanner installed and the image is upside down. My library also has this problem. Not sure how can be resolved though. Very much appreciated if someone could provide some feedback on the issue. Tested on many other devices: Kindle Fire HD, Samsung Galaxy S3, Nexus 7, ... and none of these devices show this behaviour.

@arnauorriols
Copy link

This is indeed still happening, on every device I can try.

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

No branches or pull requests

8 participants