jpush-phonegap-plugin 调用setTags返回null
cordova android环境,添加了jpush-phonegap-plugin
先调用getRegistrationID,能够正确返回id
但是后面接着调用setTags来设置标签的时候,发现返回值为null,但又不是每次都返回null,是概率性出现的
当返回的是null的时候,APP收不到推送的消息。
function SetUsersTags(tags){
try {
tags.push("facility");
window.JPush.setTags({ sequence: 1, tags: tags },
function (result) {
console.log(result.tags) //此处返回null
}, function (error) {
console.log("jpush SetUsersTags error.code :"+error.code)
})
} catch (exception) {
console.log(exception)
}
}