title: Android-nested Class and Manifest file
body: <p>Refactored my simple dial application and moved my custom 'ServiceReceiver' class so it is nested in my Main Class like so (partial code showing just nested ServiceReceiver class)</p>
  
  <pre><code>public class Main extends Activity implements OnClickListener{
  
  
      public class ServiceReceiver extends BroadcastReceiver {
  
          @Override
          public void onReceive(final Context context, Intent intent) {
              TelephonyManager telephony = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
              telephony.listen(new PhoneStateListener(){
                  @Override
                  public void onCallStateChanged(int state, String incomingNumber) {
                      super.onCallStateChanged(state, incomingNumber);
                      Log.d("foo","incomingNumber : "+incomingNumber);
  
                      EditText incomingNum = (EditText) findViewById(R.id.inputText);
  
                      incomingNum.setText(incomingNumber);
  
                  }
              },PhoneStateListener.LISTEN_CALL_STATE);
          }
      }
  </code></pre>
  
  <p>My question is, after doing this, what changes need to be made to the manifest.xml?</p>
  
  <p>Here is my existing (old) manifest file when ServiceReceiver was in a seprate file, class, not nested. </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.foo"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="19"
          android:targetSdkVersion="19" /&gt;
  
      &lt;uses-permission android:name="android.permission.CALL_PHONE" &gt;
      &lt;/uses-permission&gt;
      &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="com.example.foo.Main"
              android:label="@string/title_activity_main" &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;receiver android:name=".ServiceReceiver" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.PHONE_STATE" /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>