科尔多瓦版本:3.5.0
大家好,我正在尝试使用pushPlugin实施推送通知.但是,当我在android平台上运行此应用程序时(我还没有尝试过其他平台),出现错误“未定义设备”.
我搜索了此错误,并遇到了以下问题link1和link2
link1的解决方案对我不起作用.
关于link2的解决方案,我将/android/res/xml/config.xml粘贴在此处:
resQ
A sample Apache Cordova application that responds to the deviceready event.
Apache Cordova Team
因此,如果有人可以提供帮助,那就太好了.
这是我的javascript(.js)代码:
var pushNotification;
function onDeviceReady() {
$("#app-status-ul").append('
deviceready event received');document.addEventListener("backbutton", function(e)
{
$("#app-status-ul").append('
backbutton event received');if( $("#home").length > 0)
{
// call this to get a new token each time. don't call it to reuse existing token.
//pushNotification.unregister(suc