Flashlight control in Marshmallow

前端 未结 4 1568
情话喂你
情话喂你 2021-02-07 18:45

I have a problem regarding the camera in the most recent Marshmallow build, more specifically the flashlight. On any pre-Marshmallow version all I need to do to turn the flash o

4条回答
  •  温柔的废话
    2021-02-07 19:14

    Update your app to check for permissions at runtime. You have to have android.permission.CAMERA granted. Including it in the manifest of your app is not going to grant it to you on Marshmallow. You'll need to detect whether or not it has been granted and request it.

提交回复
热议问题