问题:这样的json对象(event)
{
"title": "title",
"alert":"ding",
"extras":{
"yourKey": "yourValue",
"cn.jpush.android.MSG_ID": "1691785879",
"app": "com.thi.pushtest",
"cn.jpush.android.ALERT": "ding",
"cn.jpush.android.EXTRA": {},
"cn.jpush.android.PUSH_ID": "1691785879",
"cn.jpush.android.NOTIFICATION_ID": 1691785879,
"cn.jpush.android.NOTIFICATION_TYPE": "0"
}
}
中的"cn.jpush.android.ALERT"属性怎么使用?
用event.extras.cn.jpush.android.ALERT是访问不到的。
正确方法:event.extras["cn.jpush.android.ALERT"]