@Override
  public void onReceive(Context context, Intent intent) {
    super.onReceive(context, intent);

    Log.i("[gcm]", "Received google cloud message");
    // XXX not sure what to do here; only used when application is in background?
  }
예제 #2
0
  @Override
  public void onReceive(Context context, Intent intent) {
    super.onReceive(context, intent);
    Log.i(TAG, "onReceive");

    // Process message
    Intent broadcast = new Intent(Contract.REGISTRATION.MESSAGE_RECEIVED);
    broadcast.putExtra(MESSAGE_DATA, bundle2string(intent.getExtras()));
    context.sendBroadcast(broadcast);
  }