問題:這樣的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"]