title: Start a short video when an incoming call is detected, first case using the emulator
body: <p>I want to be able to start a short video on an incoming phone call. The video will loop until the call is answered. I've loaded the video onto the emulator sdcard then created the appropriate level avd with a path to the sdcard.iso file on disk. Since I'm running on a Mac OS x snow leopard I am able to confirm the contents of the sdcard. All testing has be done on the Android emulator.</p>
  
  <p>In a separate project TestVideo I created an activity that just launches the video from the sdcard. That works as expected. Then I created another project TestIncoming that creates an activity that creates a PhoneStateListener that overrides the onCallStateChanged(int state, String incomingNumber) method. In the onCallStateChanged() method I check if state == TelephonyManager.CALL_STATE_RINGING. If true I create an Intent that starts the video. I'm actually using the code from the TestVideo project above. Here is the code snippet.</p>
  
  <pre><code>PhoneStateListener callStateListener = new PhoneStateListener() {
     @Override
     public void onCallStateChanged(int state, String incomingNumber) {
         if(state == TelelphonyManager.CALL_STATE_RINGING) {
             Intent launchVideo = new Intent(MyActivity.this, LaunchVideo.class);
             startActivity(launchVideo);
         }
     }
  };
  </code></pre>
  
  <p>The PhoneStateListener is added to the TelephonyManager.listen() method like so,</p>
  
  <pre><code>telephonyManager.listen(callStateListener, PhoneStateListener.LISTEN_CALL_STATE);
  </code></pre>
  
  <p>Here is the part I'm unclear on, the manifest. What I've tried is the following:</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.example.incomingdemo"
    android:versionCode="1"
    android:versionName="1.0"&gt;
  
      &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
          &lt;activity android:name=".IncomingVideoDemo"
                android:label="@string/app_name"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.ANSWER" /&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;activity android:name=".LaunchVideo"
                android:label="LaunchVideo"&gt;
          &lt;/activity&gt;
  
      &lt;/application&gt;
      &lt;uses-sdk android:minSdkVersion="2" /&gt;
      &lt;uses-permission android:name="android.permission.READ_PHONE_STATE"/&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>I've run the debugger after setting breakpoints in the IncomingVideoDemo activity where the PhoneStateListener is created and none of the breakpoints are hit. Any insights into solving this problem is greatly appreciated. Thanks.</p>