Việc bật đèn flash của thiết bị trong phiên AR có thể giúp cải thiện khả năng hiển thị.
Kiểm tra để đảm bảo cấu hình máy ảnh hiện tại hỗ trợ đèn flash
Không phải cấu hình máy ảnh nào cũng hỗ trợ bật đèn flash.
Trước khi bật đèn flash hoặc cho phép người dùng bật đèn flash, hãy đảm bảo rằng bạn có thể sử dụng đèn flash cho cấu hình máy ảnh đang hoạt động:
[null,null,["Cập nhật lần gần đây nhất: 2025-02-28 UTC."],[[["Enabling the device's flash during an AR session can enhance visibility in low-light environments."],["Before enabling the flash, verify if the active camera configuration supports it using `CameraCharacteristics.FLASH_INFO_AVAILABLE`."],["Use `Config.FlashMode.TORCH` to enable the flash and `Config.FlashMode.OFF` to disable it within the AR session configuration."],["Attempting to enable the flash on an unsupported camera configuration will have no adverse effect."]]],["To use the device's flash in an AR session, first verify if the current camera configuration supports it using `CameraCharacteristics.FLASH_INFO_AVAILABLE`. If available, enable the flash by setting the AR session's configuration to `Config.FlashMode.TORCH`. This is done through a camera manager service. If not available setting it will have no effect. To disable the flash, set the session's configuration to `Config.FlashMode.OFF`. Code examples in both Java and Kotlin are provided.\n"]]