title: Firebase Cloud Messaging: No Token and strange notification behavior
body: <p>I have a Problem with Firebase Cloud Messaging:
  I implemented a little App with the 2 extended Services FirebaseInstanceIdService and FirebaseMessagingService.</p>
  
  <p>If I start the application and send a notification via
  Firebase Console, I get the notification on my device.
  Everything works.
  If I open the App again, it hangs up and produces a black
  screen. There is no output on the Android Studio console then.
  I also don't get a second notification from Firebase console.
  Then I get a Dialog: "The Application does not react etc"
  After opening the app again it works fine again.</p>
  
  <p>I also do not get an Token in the Logcat (?)</p>
  
  <p>Firebase InstanceIdService:</p>
  
  <pre><code>public class InstanceIdService extends FirebaseInstanceIdService
  {
      private static final String TAG = "InstanceIdService";
  
      @Override
      public void onTokenRefresh()
      {
          String token = FirebaseInstanceId.getInstance().getToken();
          Log.e(TAG, "!!!!!!!!!!!!!!!!!! Got token: " + token);
      }
  }
  </code></pre>
  
  <p>FirebaseMessagingService:</p>
  
  <pre><code> public class MyFirebaseMessagingService extends FirebaseMessagingService
  {
  @Override
  public void onMessageReceived(RemoteMessage remoteMessage)
  {
      sendNotification(remoteMessage);
  }
  
  public void sendNotification(RemoteMessage remoteMessage)
  {
      Intent intent = new Intent(this, MainActivity.class);
      intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  
      PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent,PendingIntent.FLAG_ONE_SHOT);
  
      Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
  
      NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
              .setContentTitle(remoteMessage.getFrom())
              .setContentText(remoteMessage.getNotification().getBody())
              .setAutoCancel(true)
              .setSound(defaultSoundUri)
              .setContentIntent(pendingIntent);
      NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
      notificationManager.notify(0, notificationBuilder.build());
  }
  }
  </code></pre>
  
  <p>The only errors on the Android Studio Console is
  "Failed to load module descriptor class" but that is
  a known bug.</p>
  
  <p>I hope you can help me.</p>
  
  <p>Best Regards,
  Felix</p>
  
  <p>EDIT: error message From the Firebase console:</p>
  
  <pre><code>Exception java.lang.RuntimeException: Parcel android.os.Parcel@4215be98: Unmarshalling unknown type code 1936206469 at offset 68
  android.os.Parcel.readValue (Parcel.java:2087)
  android.os.Parcel.readArrayMapInternal (Parcel.java:2321)
  android.os.Bundle.unparcel (Bundle.java:249)
  android.os.Bundle.getString (Bundle.java:1118)
  com.google.firebase.messaging.FirebaseMessagingService.zzT ()
  com.google.firebase.messaging.FirebaseMessagingService.zzm ()
  com.google.firebase.iid.zzb$2.run ()
  java.util.concurrent.ThreadPoolExecutor.runWorker      (ThreadPoolExecutor.java:1112)
  java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:587)
  java.lang.Thread.run (Thread.java:841)
  </code></pre>