= false;
if (intent != null) {
String channel = intent.getExtras().getString("com.parse.Channel");
if(channel != null && channel.equalsIgnoreCase("sushi")) {
isSushiEvent = true;
onSushiEvent( intent.getExtras().getString("com.parse.Data") );
}
}
if(!isSushiEvent)
super.onPushReceive(context, intent);
}
protected void onSushiEvent(String data) {
try {
JSONObject json = new JSONObject(data);
String updatedObject = json.getString("class");
Log.i(TAG, "updated " + updatedObject);
EventBus.getDefault().post(new SushiUpdateEvent(updatedObject));
} catch (JSONException e) {
Log.d(TAG, "JSONException: " + e.getMessage());
}
} CODE