|
[多端开发]
安卓8.0以上阿里云推送发送通知怎么指定通知类别?
[复制链接]
如题,阿里云推送通知,新版本打包之后没有自动通知弹窗功能,原因是因为迁移到新用友平台之后,经历过官方自定义模块缺失(官方强制要求用户手动上传自定义模块,当时notifyChannelModule模块由于没有重新上传,缺失了这个功能,如今这个模块在新版本的帖子里面,已经找不到下载帖子链接了)
又按照另一个方法来,config.xml中添加:
<feature name="aliPush">
<param name="channelId" value="1"/>
<param name="channelName" value="cashier_aliyun"/>
<param name="channelDes" value="cashier_aliyun push"/>
</feature>
重新打包之后,点击APP的应用信息,通知中,没有展示这个通别类别选项。请问,应该怎么处理?
以下为旧版本时的一些情况:
附件中的图片,为迁移新用友平台之前的旧包的功能(使用自定义模块notifyChannelModule):
代码中的调用方法:
var notifyChannelModule = api.require('notifyChannelModule');
notifyChannelModule.getNotificationChannels(function(ret, err) {
console.log(JSON.stringify(ret));
})
notifyChannelModule.createNotificationChannel({
id : '1',
name : 'cashier_aliyun',
description : 'cashier_aliyun description',
enableLights : true,
enableVibration : true,
},function(ret, err) {
console.log(JSON.stringify(ret));
})
原帖是52yaoer大佬提供,如今也找不到原帖了。感谢!
|
|