how to check if device has flash light led android

前端 未结 5 902
旧巷少年郎
旧巷少年郎 2020-12-10 01:36

How can I check if a device has a camera led (flashlight). I am talking about devices with android OS?

I have seen solutions some solutions which talks about how to

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-10 02:01

    getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH) returns true if the device has flash. See this for more details

提交回复
热议问题