我是Parse Push通知的新手。我已经集成了Parse推送通知,我在除Lollipop之外的所有Android设备上都收到此通知。我无法确定问题所在。这是我的Parse推送接收器类
public class ParsePushReceiver extends ParsePushBroadcastReceiver {
@Override
protected void onPushReceive(Context context, Intent intent) {
super.onPushReceive(context, intent);
JSONObject json = null;
try {
json = new JSONObject(intent.getExtras().getString("com.parse.Data"));
Log.e("PUSh", "push has been received=====" + json);
NotificationUtils utils = new NotificationUtils();
//String message=json.getJSONObject("data").getString("message");
String message = json.getString("alert");
utils.showNotification(message, context);
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
protected void onPushOpen(Context context, Intent intent) {
super.onPushOpen(context, intent);
}
}