Enabling camera and disk access in the manifest

The AndroidManifest.xml (the manifest) file specifies an Android app's requirements and components. Compared to the default manifest, the manifest in Second Sight needs to do the following additional work:

We can accomplish these tasks by editing the uses-permission, uses-feature, and activity tags in the manifest.

Open AndroidManifest.xml, which is under the project's root directory. View it in the source code mode by clicking on the tab labeled AndroidManifest.xml. Edit the file by adding the highlighted code in the following snippet:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=
  "http://schemas.android.com/apk/res/android"
  package="com.nummist.secondsight"
  android:versionCode="1"
  android:versionName="1.0">

  <uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />
    
  <uses-permission android:name="android.permission.CAMERA" />
  <uses-permission android:name=
    "android.permission.WRITE_EXTERNAL_STORAGE" />
    
  <uses-feature android:name="android.hardware.camera" />
  <uses-feature android:name="android.hardware.camera.autofocus"
    android:required="false" />
  <uses-feature android:name="android.hardware.camera.flash"
    android:required="false" />
    
  <application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme">
    <activity
      android:name="com.nummist.secondsight.CameraActivity"
      android:label="@string/app_name"
      android:screenOrientation="landscape">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name=
          "android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
    <activity
      android:name="com.nummist.secondsight.LabActivity"
      android:label="@string/app_name"
      android:screenOrientation="landscape">
    </activity>
  </application>
</manifest>