title: Error Receiving Broadcast Intent Problem
body: <p>I created a broadcast receiver in the main activity and the background service which is sending broadcast intents. The application crashes each time I try to run it and the Log displays the following error message:</p>
  
  <blockquote>
    <p>10-04 13:30:43.218:
    ERROR/AndroidRuntime(695):
    java.lang.RuntimeException: Error
    receiving broadcast Intent {
    action=com.client.gaitlink.CommunicationService.action.LOGIN_STATUS_UPDATE
    (has extras) } in
    com.client.gaitlink.GaitLink$LoginStatusReceiver@431690e8</p>
  </blockquote>
  
  <p>The broadcast message is sent from CommunicationService class in the following method:</p>
  
  <pre><code>private void announceLoginStatus(){
      Intent intent = new Intent(LOGIN_STATUS_UPDATE);
      intent.putExtra(SERVER_MESSAGE, mServerResponseMessage);
      intent.putExtra(SESSION_STRING, mSessionString);
      sendBroadcast(intent);
  }
  </code></pre>
  
  <p>where </p>
  
  <pre><code>String LOGIN_STATUS_UPDATE = "com.client.gaitlink.CommunicationService.action.LOGIN_STATUS_UPDATE"
  </code></pre>
  
  <p>in the main activity the following broadcast reveiver is defined:</p>
  
  <pre><code>public class LoginStatusReceiver extends BroadcastReceiver {
  
          public void onReceive(Context context, Intent intent) {
              String serverMessage = intent.getStringExtra(CommunicationService.SERVER_MESSAGE);
              String sessionString = intent.getStringExtra(CommunicationService.SESSION_STRING);
  
              userInfo.setSessionString(sessionString);
              saveSettings();
          }
      }
  </code></pre>
  
  <p>and registered in onResume method:</p>
  
  <pre><code>        IntentFilter loginStatusFilter;
          loginStatusFilter = new IntentFilter(CommunicationService.LOGIN_STATUS_UPDATE);
          loginStatusReceiver = new LoginStatusReceiver();
          registerReceiver(loginStatusReceiver, loginStatusFilter);
  </code></pre>
  
  <p>And the manifest file includes the following:</p>
  
  <pre><code>&lt;activity android:name=".GaitLink"
                android:label="@string/app_name"&gt;
          &lt;intent-filter&gt;
              ...
              &lt;action android:name="com.client.gaitlink.CommunicationService.action.LOGIN_STATUS_UPDATE" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>I would really appreciate if anyone could explain why the Log displays the message above and the application crashes.</p>
  
  <p>Thanks!</p>