0

我正在尝试在 Android 的 Phonegap 上推送通知。我很好地遵循了本教程http://devgirl.org/2013/07/17/tutorial-implement-push-notifications-in-your-phonegap-application/。但它总是返回一个警报回调成功!结果 = 好的,不是 regid。我不知道为什么。这是我的日志:

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

任何人都可以帮忙吗?提前致谢!

4

0 回答 0