C2DM钛Appcelerator的整合 [英] C2DM and Titanium Appcelerator Integration

查看:206
本文介绍了C2DM钛Appcelerator的整合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为了实现在Android C2DM现在用钛Appcelerator的。看着他们的论坛和许多#1的答案后,我发现的的走到我通过编译并结合模块(钛C2DM从指南 GitHub上)到我的程序。我能够编译并正确链接一切,但企图%的抽样code注册

I am using Titanium Appcelerator in order to implement C2DM on Android. After looking at many answers in their forums and in Stackoverflow, I found a guide that walked me through compiling and incorporating a module(titanium-c2dm from GitHub) into my program. I was able to compile and link everything properly, but in an attempt to register per the sample code

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 get the following error on my device (from adb 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

没有任何人有任何想法如何纳入我的项目呢?
任何帮助将是AP preciated

Does anybody have any idea how to incorporate this into my project? Any help would be appreciated

推荐答案

这为我工作:

在您的tiapp.xml和timodule.xml变化

change in your tiapp.xml and timodule.xml

<service android:name=".C2DMReceiver"/>

<service android:name="com.findlaw.c2dm.C2DMReceiver"/>

这篇关于C2DM钛Appcelerator的整合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆