處理 Android 中的下游訊息

實現將捕獲從 GCM 伺服器傳送的通知的 onMessageReceived

  @Override
  public void onMessageReceived(String from, Bundle data) {
     String message = data.getString("message");
     Log.d(TAG, "From: " + from);
     Log.d(TAG, "Message: " + message);
     // Handle received message here.
  }