[英]Urban Airship Phonegap
I'm developing an application using the phonegap AU plugin. 我正在使用phonegap AU插件开发应用程序。 The build process runs via Phonegap Build and successfully occurs. 构建过程通过Phonegap Build运行,并成功进行。 However when I try to open the application, I am getting the following error: 但是,当我尝试打开应用程序时,出现以下错误:
W/PackageParser( 6962): No actions in intent filter at /storage/emulated/0/Download/PushPG-debug.apk Binary XML file line #15
D/RCPManagerService( 816): PackageReceiver onReceive() bundle Bundle[{com.urbanairship.autopilot=com.urbanairship.phonegap.PushAutopilot, com.google.android.gms.version=6587000}]
I/PCWCLIENTTRACE_PushUtil( 6564): SPPPushClient is installed : true
I/PCWCLIENTTRACE_PushUtil( 6564): sales region : global
I/PCWCLIENTTRACE_PushUtil( 6564): getPushTypeList : [SPP, GCM]
I/dalvikvm( 7257): Could not find method android.support.v4.app.NotificationManagerCompat.from, referenced from method com.urbanairship.push.PushManager.<init>
I/dalvikvm( 7257): Could not find method android.support.v4.app.NotificationManagerCompat.notify, referenced from method com.urbanairship.push.PushManager.show
E/AndroidRuntime( 7257): at com.urbanairship.push.PushManager.<init>(PushManager.java:212)
E/SPPClientService(13835): [[PushClientService]] F:false, D:false, E:false, T:false, S:true, R:false
In my config.xml I added the follow line: My test Code: 在我的config.xml中,添加了以下行:我的测试代码:
document.addEventListener('urbanairship.registration', this.onUrbanAirshipRegistration, false);
onUrbanAirshipRegistration = function (event) {
if (event.error) {
console.log('there was an error registering for push notifications');
} else {
console.log("Registered with ID: " + event.pushID);
}
app.receivedEvent('urbanairship.registration');
},
Urban Airship不提供对Phonegap Build的支持,尽管有一个可以手动安装的插件: https : //github.com/urbanairship/phonegap-ua-push
i think you add some code on wrong place. 我认为您在错误的地方添加了一些代码。 you can't add document.addeventlistner... in config.xml. 您无法在config.xml中添加document.addeventlistner...。
Please can you again go through following links carefully. 请您再次仔细查看以下链接。
For documentation: http://docs.urbanairship.com/ 有关文档: http : //docs.urbanairship.com/
For implimentation: https://github.com/urbanairship/phonegap-ua-push 为了实现: https : //github.com/urbanairship/phonegap-ua-push
Thanks. 谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.