问题标签 [phonegap-pushplugin]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1439 浏览

ios - 如何从 iOS 推送插件调用 JavaScript 函数?

我正在开发一个 Phonegap 应用程序。为了实现推送通知,我使用了一个 iOS 插件(来自 github 的 AppDelegate+Notification 和 PushNotification 文件),并且成功地在 APNs 上注册了设备并能够使用我的 MAC 机器的终端发送推送通知(使用 .php 文件)。

当我的应用程序处于活动模式时,我可以在“didReceiveRemoteNotification”块内接收通知。当我点击通知中心的任何通知时,也会执行此方法。

我面临的问题是:

  1. 当我的应用通过通知点击激活(处于后台状态)时,如何从“didReceiveRemoteNotification”获取 Notification.js 函数调用?

因为应用程序能够调用该函数:

当它已经处于活动状态并且通知到来时。最后一步的警报被触发(JS notificationCallback)

或者以简单的方式,如何从我的 ios 插件中调用 java 脚本函数?

0 投票
0 回答
621 浏览

cordova - 如果应用程序直接启动,则检测通知

使用 PhoneGap 和 pushPlugin 进行通知,有没有办法在应用程序直接启动时检测通知?

即,如果有人点击通知,应用程序启动,我可以使用 onNotificationAPN() 函数检测通知信息,但如果用户忽略通知然后直接打开应用程序,即使它有红色的小通知编号onNotificationAPN() 没有被解雇。

0 投票
3 回答
6591 浏览

cordova - Cordova 推送通知 (PhoneGap PushPlugin) 未触发 ecb 回调 (onNotificationAPN)

我将Cordova Push Notifications Plugin 1.3.4与我的 Cordova/Phonegap 应用程序一起使用。不幸的是,当收到推送通知时,我的 JavaScript 中的 ecb 回调永远不会被触发,我无法处理推送通知(即使应用程序在前台运行时也不行)。

我正在使用演示中的示例代码

注册成功,但从未触发以下回调:

0 投票
2 回答
977 浏览

cordova - PhoneGap 的 PushPlugin 构建后台通知

我无法使用 PhoneGap Build 和 PushPlugin 在后台接收通知并出现在通知托盘中。我正在使用 Cordova 3.3 和最新版本的 PushPlugin。

应用程序打开时一切正常。我收到有效载荷并可以做出相应的响应。

当应用程序关闭或在后台运行时,什么都不会出现。我希望至少在通知托盘中有一个警报,但我没有得到。

如何解决这里发生的问题?我知道我的插件使用基本正确,因为当应用程序处于前台时它工作正常。

0 投票
1 回答
528 浏览

android - Apigee push notifications on Android not delivered when app in background (Phonegap)

I am trying to use apigee push notifications with Android phonegap app build 3.3.0, PushPlugin. My push notifications sent when the app is in foreground are displayed correctly, but when the app is in background they are not shown.

It looks like the issue is that apigee sends a push with payload that contains "data" property (e.payload.data), instead of "message" property, and since there is no "message" property and that's why android does not display it.

Can you please advise if it is possible to change the payload format of apigee push messages or make the phonegap app to handle "data" in the payload correctly?

Thanks!

0 投票
1 回答
479 浏览

android - 当应用程序在后台时,PushPlugin 出错

我正在尝试使用以下方法实现使用 Cordava 3.3 创建的推送通知应用程序:https ://github.com/phonegap-build/PushPlugin ;在本教程中以我为基础:www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql 但我有两个基本问题,第一个是通知确实如果应用程序在后台或关闭,则不会导致,第二个是当应用程序在前台打开时消息到达未定义,可能会有所帮助,据我所知,可能是由于 JSON 响应的格式或发送的参数在相同的。

这是我的代码不需要很长时间: https ://github.com/jedidas/Push

0 投票
1 回答
645 浏览

cordova - Phonegap 3.4 pushplugin deviceready 运行两次

跑两次

Phonegap pushplugin deviceready 运行两次。我只绑定了一次事件

附图。在phonegap 3.4上。任何人都可以用 3.4 成功运行这个插件吗?

有什么理由吗?即使没有错误消息,我也没有收到 regid。

0 投票
1 回答
393 浏览

push-notification - phonegap build 3.3.0 + pushwoosh 不工作

我根据本指南安装:http ://www.pushwoosh.com/programming-push-notification/android/android-additional-platforms/phonegap-build/

我在 pushwoosh 中定义了需要证书。IOS系统出现错误

your provisioning profile does not have aps entry. Please make your profile push compatible

和 Android 应用程序费用,但我发送通知不来。

问题可能出在哪里?我究竟做错了什么?

谢谢您的帮助!

0 投票
1 回答
263 浏览

android - 如何在cordova中设置通知PushPlugin?

我的问题是如何配置通知,即有标题和消息,因为它只给我消息但没有标题。在文件“GCMIntentService.java”插件中,我找到了三个变量,title、message 和 msgcnt,可以告诉我每个变量是如何使用的以及它的作用吗?

这里收到的数据不好,使用默认值

0 投票
0 回答
147 浏览

android - 如何在phonegap中运行后台服务甚至会关闭

我搜索了很多,但我仍然找到了解决这个问题的正确方法。我想使用 Phonegap 甚至应用程序停止生成通知。我正在从 rss feed 获取数据。每当有人更新他们的提要并且我正在使用他们的提要时,我都会收到相应的通知,此内容已添加到提要中。请参考一些示例或步骤或教程来执行此操作。我正在使用 android 板表生成 phonegap 应用程序。