我正在使用Titanium Appcelerator以在Android上實現C2DM。在他們的論壇和Stackoverflow上看到很多答案後,我發現a guide讓我編譯並將模塊(titanium-c2dm from GitHub)合併到我的程序中。我能夠編譯和正確鏈接一切,但在試圖按照示例代碼C2DM和鈦Appcelerator集成
c2dm.registerC2dm(senderId, {
success:function(e)
{
//stuff here
},
error:function(e)
{
//stuff here
},
callback:function(e) // called when a push notification is received
{
//stuff here
}
});
我得到我的設備上出現以下錯誤登記(來自亞行logcat):
I/TiAPI (2731): Registering...
D/C2dmModule(2731): (KrollRuntimeThread) [196,687] registerC2dm called
D/C2dmModule(2731): (KrollRuntimeThread) [1,688] get registrationId property
MORE STUFF HAPPENS HERE
W/ActivityManager( 127): Unable to start service Intent
{act=com.google.android.c2dm.intent.REGISTRATION
cat=[com.vivas.c2dmtest] cmp=com.vivas.c2dmtest/com.findlaw.c2dm.C2DMReceiver (has extras) }: not found
有誰有任何想法如何將其納入我的項目? 任何幫助,將不勝感激
你能分享你如何得到它編譯?當我嘗試用螞蟻構建時,它會給我一個構建錯誤,它顯然找不到gpref? – 2012-07-06 18:56:39