Ionic 1推送通知 [英] Ionic 1 push notification

查看:79
本文介绍了Ionic 1推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人对ionic 1推送通知有经验吗?他们建议使用云解决方案吗?有人可以展示实现的例子吗?并且请记住,我在离子领域完全陌生

Does someone have experience with ionic 1 push notifications? Is there any alternative to cloud solution that they suggest? And can someone show example of implementatio? And please have on mind that I'm completly new in ionic

推荐答案

我使用了此插件 https ://github.com/phonegap/phonegap-plugin-push 处理推送通知.

I use this plugin https://github.com/phonegap/phonegap-plugin-push to handle push notification.

var pushOptions = {
    android: {
        senderID: "1234567890",
        icon: "push_icon",
        iconColor: "#FFF"
    },
    ios: {
        alert: true,
        badge: true,
        sound: true
    }
};

var push = PushNotification.init(pushOptions);

push.on('registration', function () {});

push.on('notification', function () {});

这篇关于Ionic 1推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆