Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cordova Phonegap PushPlugin不';无法接收注册id_Cordova_Phonegap Pushplugin - Fatal编程技术网

Cordova Phonegap PushPlugin不';无法接收注册id

Cordova Phonegap PushPlugin不';无法接收注册id,cordova,phonegap-pushplugin,Cordova,Phonegap Pushplugin,我正在尝试在Android的Phonegap上推送通知。我很好地遵循了这个教程。但它总是返回一个警报回调成功!结果=正常,不是注册表。我不知道为什么。这是我的日志: 12-27 09:51:43.420: D/CordovaWebViewClient(1225): onPageFinished(file:///android_asset/www/index.html) 12-27 09:51:43.424: D/CordovaActivity(1225): onMessage(onPageFin

我正在尝试在Android的Phonegap上推送通知。我很好地遵循了这个教程。但它总是返回一个警报回调成功!结果=正常,不是注册表。我不知道为什么。这是我的日志:

12-27 09:51:43.420: D/CordovaWebViewClient(1225): onPageFinished(file:///android_asset/www/index.html)
12-27 09:51:43.424: D/CordovaActivity(1225): onMessage(onPageFinished,file:///android_asset/www/index.html)
12-27 09:51:43.500: V/PushPlugin(1225): execute: action=register
12-27 09:51:43.500: V/PushPlugin(1225): execute: data=[{"senderID":"169248234807","ecb":"app.onNotificationGCM"}]
12-27 09:51:43.500: V/PushPlugin(1225): execute: jo={"senderID":"169248234807","ecb":"app.onNotificationGCM"}
12-27 09:51:43.500: V/PushPlugin(1225): execute: ECB=app.onNotificationGCM senderID=169248234807
12-27 09:51:43.500: D/GCMRegistrar(1225): resetting backoff for com.unitech.pushplugindemo
12-27 09:51:43.544: V/GCMRegistrar(1225): Registering app com.unitech.pushplugindemo of senders 169248234807
12-27 09:51:43.544: W/PluginManager(1225): THREAD WARNING: exec() call to PushPlugin.register blocked the main thread for 48ms. Plugin should use CordovaInterface.getThreadPool().
12-27 09:51:43.592: D/CordovaLog(1225): file:///android_asset/www/js/index.js: Line 47 : Received Event: deviceready
12-27 09:51:43.592: I/chromium(1225): [INFO:CONSOLE(47)] "Received Event: deviceready", source: file:///android_asset/www/js/index.js (47)
12-27 09:51:43.656: D/dalvikvm(1225): GC_FOR_ALLOC freed 401K, 7% free 6452K/6916K, paused 11ms, total 12ms
12-27 09:51:43.676: I/dalvikvm-heap(1225): Grow heap (frag case) to 6.958MB for 629772-byte allocation
12-27 09:51:43.680: D/dalvikvm(1225): GC_FOR_ALLOC freed <1K, 7% free 7067K/7532K, paused 7ms, total 7ms
12-27 09:51:43.420:D/CordovaWebViewClient(1225):第页完成(file:///android_asset/www/index.html)
12-27 09:51:43.424:D/CordovaActivity(1225):onMessage(onPageFinished,file:///android_asset/www/index.html)
12-27 09:51:43.500:V/PushPlugin(1225):执行:操作=寄存器
12-27 09:51:43.500:V/PushPlugin(1225):执行:data=[{“senderID”:“169248234807”,“ecb”:“app.onNotificationGCM”}]
12-27 09:51:43.500:V/PushPlugin(1225):执行:jo={“senderID”:“169248234807”,“ecb”:“app.onNotificationGCM”}
12-27 09:51:43.500:V/PushPlugin(1225):执行:ECB=app.onNotificationGCM senderID=169248234807
12-27 09:51:43.500:D/gcmregistar(1225):重置com.unitech.pushplugindemo的退避
12-27 09:51:43.544:V/gcmregistar(1225):注册发件人的应用程序com.unitech.pushplugindemo 169248234807
12-27 09:51:43.544:W/PluginManager(1225):线程警告:对PushPlugin.register的exec()调用阻止了主线程48毫秒。插件应使用CordovaInterface.getThreadPool()。
12-27 09:51:43.592:D/CordovaLog(1225):file:///android_asset/www/js/index.js: 第47行:收到的事件:deviceready
12-27 09:51:43.592:I/chromium(1225):[信息:控制台(47)]“收到的事件:deviceready”,来源:file:///android_asset/www/js/index.js (47)
12-27 09:51:43.656:D/dalvikvm(1225):释放401K的所有数据的GC_,7%的自由数据6452K/6916K,暂停11毫秒,总计12毫秒
12-27 09:51:43.676:I/dalvikvm堆(1225):为629772字节分配将堆(frag大小写)增长到6.958MB

12-27 09:51:43.680:D/dalvikvm(1225):GC_FOR_ALLOC freed您是在emulator还是在设备上测试的?我是在emulator上测试的。我需要在真实设备上测试吗?是的,你需要在真实设备上测试。谢谢你的评论。我要试试看。