Adding a Class to the Android Manifest File

Add a Detail Activity class to the AndroidManifest.xml file. This declaration causes the application to launch a customer detail screen where you can make changes when you test the application.

  1. In the Android Manifest AndroidManifest.xml tab, add these values to the AndroidManifest.xml file.
    You can use the AndroidManifest.xml file from the SUP_Android_Custom_Dev_Tutorial_code.zip file to cut and paste the entire <activity> element.
    <activity android:name=".DetailActivity"
              android:label="@string/app_name">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
       </intent-filter>
    </activity>
  2. Select File > Save.
    The XML file should look like this:
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.sybase.sup.samples.objectapi"
        android:versionCode="1"
        android:versionName="1.0" >
    
        <uses-sdk android:minSdkVersion="8" />
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    
        <application
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name" >
            <activity
                android:name=".SUP101SampleActivity"
                android:label="@string/app_name" >
                <intent-filter >
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            <activity android:name=".DetailActivity"
              android:label="@string/app_name">
              <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
               </intent-filter>
            </activity>
        </application>
    </manifest>