Skip to content

Add support for Android portrait mode #111

Closed
@donv

Description

@donv
No description provided.

Activity

srowen

srowen commented on Apr 11, 2014

@srowen
Contributor

A bit of good news -- it already exists, although in the for-pay version.
https://play.google.com/store/apps/details?id=com.srowen.bs.android

It seems inevitable that this UI will be back-ported, like other features in that app. It's more feasible than it was.

It would be strange to have two quite different new UIs, so on the one hand you could say, no, nobody submit a new different portrait UI here. But then I'd be in the position of arguing against a valid enhancement just because I hadn't gotten around to back-porting the other UI.

But nobody has proposed any work on a portrait UI, so the issue hasn't been forced.

I think we could do two ways here. If someone suggested a minimal update to the current UI that made it work in portrait, I'd merge that with whatever internal changes are needed to really get it right and commit the result. It seems reasonable to entertain a new UI that is not the same as in BS+ but is as like the BS UI as possible.

peitek

peitek commented on Jun 15, 2014

@peitek

+1

devjack

devjack commented on Aug 10, 2014

@devjack

I'm looking at implementing support for the BarcodeScannerFragment to be used in portrait mode, similar size and dimensions to Facebook Messengers 'quick photo' feature. Problem being (I think) the framingRect passed into PlanarYUVLuminanceSource from CameraManager is of the wrong dimentions.

This goes a little beyond my android experience here w/ the camera manager so keen to hear thoughts on solving. From what I've been able to determine so far I suspect making the crop/framingrect more flexible will mean the fragment can be used in any dimension.

srowen

srowen commented on Aug 10, 2014

@srowen
Contributor

Yes, you have to request a preview size like "480x800" instead of "800x480" in portrait. You will also need to account for rotation, since the preview frame you get is still relative to the camera's orientation and may need to be 'rotated' to be read. And, the camera's orientation is not necessarily the same on all devices. And it's flipped for front cameras!

youyi1314

youyi1314 commented on Aug 14, 2014

@youyi1314

Nice,
I wish to have it support both portrait and landscape by using rotate the phone.
and also i like the barcodescanner+ layout, wish to has it update.

Thanks srowen for the source, I'm still learning android development skill.
Best Regards.

dpolivy

dpolivy commented on Nov 12, 2014

@dpolivy

I'd love to see this added, as well. Using this post as a guide, I'm able to get it working for the majority of users -- but I'm not sure it correctly accounts for base camera orientation. I have one user, who is using a custom ROM (Temasek, based on CM 11.0, and SlimKat) where the preview output is completely garbled.

Any tips on how/where to detect and compensate for camera orientation if it isn't defaulting to landscape? I'm happy to help contribute to this item if I can.

ghost

ghost commented on Feb 10, 2015

@ghost

+1

fbreda

fbreda commented on Feb 10, 2015

@fbreda

+1

2015-02-10 15:06 GMT-02:00 WACMemphis notifications@github.com:

+1


Reply to this email directly or view it on GitHub
#111 (comment).

srowen

srowen commented on Feb 10, 2015

@srowen
Contributor

Hi all, +1 won't do anything, there's nobody taking feature requests, but I'll work with someone who wants to implement this to merge it with my implementation to make something best of both worlds.

chepe263

chepe263 commented on Mar 24, 2015

@chepe263

I was reading the help in the application. When my deviced changed orientation to landscape, the help went white. Is this the same issue?

edy1

edy1 commented on Apr 4, 2015

@edy1

+1

be1box

be1box commented on Apr 23, 2015

@be1box

+1

srowen

srowen commented on Apr 23, 2015

@srowen
Contributor

@edy1 @mifa did you read my comment? +1 is just spam unless you are going to contribute code.

32 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @donv@be1box@liyzay@schildbach@srowen

        Issue actions

          Add support for Android portrait mode · Issue #111 · zxing/zxing