title: Upstream messaging in Android
body: <p>I am doing work on GCM (Google Cloud Messaging) in Android. I am looking for the upstream message using GCM.</p>
  
  <p>Code send the GCM messages to cloud here</p>
  
  <pre><code>try {
     Bundle data = new Bundle();
     // the account is used for keeping 
     // track of user notifications
     data.putString("account", account);
     // the action is used to distinguish 
     // different message types on the server
     data.putString("action", Constants.ACTION_REGISTER);
     String msgId = Integer.toString(getNextMsgId());
     gcm.send(projectId + "@gcm.googleapis.com", msgId,
           Constants.GCM_DEFAULT_TTL, data);
  } catch (IOException e) {
     Log.e("grokkingandroid",
           "IOException while sending registration id", e);
  }
  </code></pre>
  
  <p>Now question is that what cloud would do for that upstream message, Where it can be useful in Android and How ??</p>