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

Auto flash for front camera always using screen flash #181

Open
Zeronfinity opened this issue Apr 17, 2024 · 3 comments
Open

Auto flash for front camera always using screen flash #181

Zeronfinity opened this issue Apr 17, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Zeronfinity
Copy link
Collaborator

Zeronfinity commented Apr 17, 2024

JCA Version: 1.0.0-rc01
Device: Pixel 7 pro

Probably AE state can be used for this, but that's not available in all devices (legacy devices don't report 3A states at all), so need to consider the UI for those cases as well.

Maybe it's better to handle all these in CameraX, we can probably provide an API which mentions if something like AUTO_SCREEN_FLASH is supported, but not sure how big of a priority this should be. We can start a feature request to CameraX first and discuss further.

@Zeronfinity Zeronfinity added the bug Something isn't working label Apr 17, 2024
@temcguir
Copy link
Collaborator

Tahsin, are you able to look at this?

@Zeronfinity
Copy link
Collaborator Author

Zeronfinity commented Apr 17, 2024

I'll file a FR bug and discuss further at CameraX side.

But I haven't seen any other apps actually doing this, and I suppose this is not too important for JCA too, right?

Meanwhile, JCA probably needs to decide on how to handle different camera requiring/supporting different flash modes (and perhaps the same for other settings as well), i.e. there needs to be a way in JCA to not provide users the option to set auto flash in case of front camera (since it's never guaranteed to be supported). But this comes with problems like what to do if user sets flash auto in rear camera and then changes to front camera.

  1. Switch to flash always on if auto is not supported. But then comes the question of what should happen if user switches back to rear camera.

  2. JCA remembers settings differently for each camera and user needs to explicitly set the setting for each camera. This is what most apps do and seem most reasonable.

  3. Some sort of hybrid of no. 1 and 2.

Do you already have some plans/issues regarding this?

@temcguir
Copy link
Collaborator

Ah gotcha. Yes we have some in-progress work to add camera "constraints" per-lens (see #168) . We can make sure the front lens only suppors ON and OFF for now.

The simple UX for this would be to change to ON when AUTO was used for the back lens. When switching back, we would just stay using ON. More complicated UX would be to keep track of whatever setting the user last prescribed and switch back to that. So if they switch lenses to the front but never actually explicitly change the flash mode, it would return to whatever they had previously set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants