android - 如何使用 Cordova 显示状态栏通知 - Android 和 IOS

标签 android cordova push-notification cordova-plugins statusbar

我阅读了许多有关状态栏通知的博客和 Stackoverflow 线程,并且大多数博客都使用插件 https://github.com/phonegap/phonegap-plugins/tree/master/Android/StatusBarNotification

但这会产生 404 错误。我没有找到任何其他有效的插件来执行此操作。

我需要让以下代码正常工作。我需要使用什么插件?

window.plugins.statusBarNotification.notify("Notification", "Registered with Server");

谢谢

最佳答案

我使用以下插件和代码 fragment 解决了我的问题。

de.appplant.cordova.plugin.local-notification

cordova.plugins.notification.local.schedule({
    id: 1,
    title: "Production Jour fixe",
    text: "Duration 1h",
    firstAt: monday_9_am,
    every: "week",
    sound: "file://sounds/reminder.mp3",
    icon: "http://icons.com/?cal_id=1",
    data: { meetingId:"123#fg8" }
});

cordova.plugins.notification.local.on("click", function (notification) {
    joinMeeting(notification.data.meetingId);
});

谢谢。

关于android - 如何使用 Cordova 显示状态栏通知 - Android 和 IOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40606071/

相关文章:

javascript - 使用 jQuery 将 Fastclick 绑定(bind)到新动态创建的元素

android - 客户端(android 应用程序)确认发送的 gcm 消息

iOS - 检查应用程序中的推送通知支持

android - mvc Controller 中重定向到 'market://details?id=my.package.name' 失败

安卓 NoClassDefFoundError : com. google.firebase.FirebaseOptions

java - android等待服务器响应

java - 如何使用 Kotlin 构建 cordova 项目

android - Phonegap Android StatusBarNotification 插件不发出通知声音

android - 使用 GCM、Urban Airship 发送推送通知

android - 通过 Intent 额外通过电子邮件发送图像时发生 transactiontoolargeException