Skip to content

Conversation

@MeBlackLi
Copy link

No description provided.

@MeBlackLi MeBlackLi changed the title Fix Flash switch issue on newer API #668 Fix Flash switch issue on newer API Apr 2, 2024
@MeBlackLi
Copy link
Author

Fix Flash Issue, Tested On Android 13&14

Context = autoclass('android.content.Context')
CameraManager = activity.getSystemService(Context.CAMERA_SERVICE)
CameraCharacteristics = autoclass("android.hardware.camera2.CameraCharacteristics")
CamId = CameraManager.getCameraIdList()[0] # First Camera
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I don't like this method to force it to be [0]. For loop with checks would be one way of dealing with this. All Androids do not have a camera so it would be basically better to find out if it's supported.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants