@Override protected void onPushOpen(Context context, Intent intent) { intent.putExtra("push", true); if (description != null) intent.putExtra("description", description); super.onPushOpen(context, intent); }
@Override protected void onPushReceive(Context context, Intent intent) { super.onPushReceive(context, intent); if (intent == null) return; try { JSONObject json = new JSONObject(intent.getExtras().getString("com.parse.Data")); description = json.optString("alert", null); parseIntent = intent; } catch (JSONException e) { e.printStackTrace(); } }
@Override protected void onPushReceive(Context context, Intent intent) { super.onPushReceive(context, intent); if (intent == null) return; try { JSONObject json = new JSONObject(intent.getExtras().getString("com.parse.Data")); Log.e(TAG, "Push received: " + json); parseIntent = intent; parsePushJson(context, json); } catch (JSONException e) { Log.e(TAG, "Push message json exception: " + e.getMessage()); } }
@Override protected void onPushOpen(Context context, Intent intent) { super.onPushOpen(context, intent); }
@Override protected void onPushDismiss(Context context, Intent intent) { super.onPushDismiss(context, intent); }
public void onReceive(Context context, Intent intent) { super.onReceive(context, intent); System.out.println("Notification received from - PARSE"); }