title: Which permissions are required for Flashlight?
body: <p>I've used <code>&lt;uses-permission android:name="android.permission.FLASHLIGHT" /&gt;</code> but my app keeps crashing. I'm making a Torch app. Here's my Manifest code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.Torch"&gt;
      &lt;uses-permission android:name="android.permission.FLASHLIGHT" /&gt;
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;activity android:name="com.Torch.MainActivity"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Error log:</p>
  
  <pre><code>03-28 15:29:23.439 7163-7163/com.Torch E/AndroidRuntime: FATAL EXCEPTION: main
   Process: com.Torch, PID: 7163
   java.lang.RuntimeException: Unable to start activity ComponentInfo{com.Torch/com.Torch.MainActivity}: java.lang.RuntimeException: Fail to connect to camera service
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2493)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2555)
       at android.app.ActivityThread.access$800(ActivityThread.java:176)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1437)
       at android.os.Handler.dispatchMessage(Handler.java:111)
       at android.os.Looper.loop(Looper.java:194)
       at android.app.ActivityThread.main(ActivityThread.java:5576)
       at java.lang.reflect.Method.invoke(Native Method)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:956)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751)
    Caused by: java.lang.RuntimeException: Fail to connect to camera service
       at android.hardware.Camera.&lt;init&gt;(Camera.java:637)
       at android.hardware.Camera.open(Camera.java:496)
       at com.Torch.MainActivity.onCreate(MainActivity.java:33)
       at android.app.Activity.performCreate(Activity.java:6005)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1111)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2446)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2555) 
       at android.app.ActivityThread.access$800(ActivityThread.java:176) 
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1437) 
       at android.os.Handler.dispatchMessage(Handler.java:111) 
       at android.os.Looper.loop(Looper.java:194) 
       at android.app.ActivityThread.main(ActivityThread.java:5576) 
       at java.lang.reflect.Method.invoke(Native Method) 
       at java.lang.reflect.Method.invoke(Method.java:372) 
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:956) 
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751) 
  </code></pre>