I want to receive a push notification from Parse and open an List activity and use intent.putextra(\"dataFromParse\") before starting the activity. I\'m able to receive the push
You should override onPushOpen(...) method in your receiver class:
import com.parse.ParsePushBroadcastReceiver;
public class PushIntentReceiver extends ParsePushBroadcastReceiver {
@Override
protected void onPushOpen(Context context, Intent intent) {
JSONObject pushData = null;
try {
pushData = new JSONObject(intent.getStringExtra(KEY_PUSH_DATA));
Intent pushIntent = new Intent(context, YourActivity.class);
pushIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
pushIntent.putExtra("store", pushData.getString("data"));
context.startActivity(pushIntent);
} catch (JSONException e) {
e.printStackTrace();
}
}
}