0

I have read something about permissions in "https://developer.android.com/training/permissions/declaring.html".

In there i have seen "Depending on how sensitive the permission is, the system might grant the permission automatically, or the device user might have to grant the request."

For example,

if your app requests permission to turn on the device's flashlight, the system grants that permission automatically.

My question is that for accessing the flashlight we have request the camera permission first. So why is it written that for flashlight app the permission will be granted automatically?

SripadRaj
  • 1,687
  • 2
  • 22
  • 33
YoYo Hai
  • 27
  • 6

1 Answers1

2

The CameraManager.setTorchMode (how you'd turn on the flashlight on API 23+ devices) does not require the CAMERA permission.

ianhanniballake
  • 191,609
  • 30
  • 470
  • 443