使用C2DM的Appcelerator钛推送通知?

时间:2012-03-21 06:15:38

标签: android titanium push-notification appcelerator-mobile

我正在使用Appcelerator Titanium版本1.8.0有人尝试使用谷歌的C2DM.if推送通知,所以帮我创建示例推送通知。

1 个答案:

答案 0 :(得分:4)

这并不困难:这是步骤......

  
      
  1. 来自github的克隆项目
  2.   
  3. 查找build.properties
  4.   
  5. 修改所有路径以适合您环境中的路径(和版本)
  6.   
  7. 您可以选择从此处http://developer.android.com/sdk/ndk/index.html
  8. 下载并安装android sdk   
  9. 在模块根目录中打开控制台并输入ant并按Enter键
  10.   
  11. 构建过程应该以类似构建的方式结束
  12.   
  13. 在模块目录中,您将在dist文件夹
  14. 中找到构建结果   
  15. 打开该文件夹,解压缩com.findlaw.c2dm-android-0.1.zip
  16.   
  17. 创建一个文件夹:modules / android / com.findlaw.c2dm / 0.1
  18.   
  19. 将modules / android / com.findlaw.c2dm / 0.1的内容复制到文件夹[your_project] /modules/android/com.findlaw.c2dm /
  20.   
  21. 将timodule.xml复制到项目的根文件夹(tiapp.xml所在的位置)
  22.   
  23. 打开tiapp.xml并将所有出现的com.findlaw.c2dm替换为您的应用ID,但包含以下内容的行除外:   com.findlaw.c2dm.C2DMReceiver
  24.   
  25. 在tiapp.xml中注册模块:
  26.   
    <modules>
       <module platform="android" version="0.1">com.findlaw.c2dm</module>
     </modules>


 14. Use the module in your code as described in the example of the module

有关我们团队成员的更多检查this communication ...

您的模块文件夹不应位于资源文件夹

enter image description here