@Override public void onMessage(Context context,Intent intent){
  String id=intent.getStringExtra("id");
  String operation=intent.getStringExtra("operation");
  String emailAddress=intent.getStringExtra("emailAddress");
  Log.i(CloudNotesActivity.TAG,"id=" + id + ", operation="+ operation+ ", emailAddress="+ emailAddress);
  NoteApplication app=(NoteApplication)getApplication();
  if (emailAddress.equals(app.getEmailAddress())) {
    app.notifyListener(id,operation);
  }
}

@ Override public void onMessage ( Context context , Intent intent ) { String id = intent . getStringExtra ( "id" ) ; String operation = intent . getStringExtra ( "operation" ) ; String emailAddress = intent . getStringExtra ( "emailAddress" ) ; Log . i ( CloudNotesActivity . TAG , "id=" + id + ", operation=" + operation + ", emailAddress=" + emailAddress ) ; NoteApplication app = ( NoteApplication ) getApplication ( ) ; if ( emailAddress . equals ( app . getEmailAddress ( ) ) ) { app . notifyListener ( id , operation ) ; } }
called when a cloud message has been received .
