title: Android/Firebase - Error while parsing timestamp in GCM event - Null timestamp
body: <p>I'm building an Android app which will receive push notifications. I've got Firebase Cloud Messaging setup and pretty much working, such that I can send the following payload to a valid token and the notification and data are received. </p>
  
  <p>Using url <code>https://fcm.googleapis.com/fcm/send</code></p>
  
  <pre><code>{
   "to":"&lt;valid-token&gt;",
   "notification":{"body":"BODY TEXT","title":"TITLE TEXT","sound":"default"},
   "data":{"message":"This is some data"}
  }
  </code></pre>
  
  <p>My app receives it correctly and can deal with it. </p>
  
  <p>The only slight wrinkle is that I get the following exception thrown in the debug:</p>
  
  <pre><code>Error while parsing timestamp in GCM event
      java.lang.NumberFormatException: Invalid int: "null"
          at java.lang.Integer.invalidInt(Integer.java:138)
          ...
  </code></pre>
  
  <p>It doesn't crash the app, it just looks untidy.</p>
  
  <p>I've tried adding a <code>timestamp</code> item to the main payload, the notification, the data, and also tried variations such as <code>time</code> but can't seem to get rid of the exception (and google as I might, I can't find an answer).</p>
  
  <p>How do I pass the timestamp so it stops complaining?</p>
  
  <p>Edited: Here is my <code>onMessageReceived</code> method, but I think the exception is thrown before it gets here</p>
  
  <pre><code>@Override
  public void onMessageReceived(RemoteMessage remoteMessage) {
      Log.d(TAG, "From: " + remoteMessage.getFrom());
  
      // Check if message contains a data payload.
      if (remoteMessage.getData().size() &gt; 0) {
          Log.d(TAG, "Message data payload: " + remoteMessage.getData());
          //TODO Handle the data
      }
  
      // Check if message contains a notification payload.
      if (remoteMessage.getNotification() != null) {
          Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody());
      }
  }
  </code></pre>
  
  <p>Thanks in advance,
  Chris</p>