[英]Appcelerator titanium push Notification using C2DM?
我正在使用Appcelerator Titanium版本1.8.0,有人尝试过使用Google的C2DM进行推送通知。如果这样,请帮助我创建示例推送通知。
It is not that difficult: Here is steps for it... 并不是那么困难:这里有一些步骤...
- Clone project from github
从github克隆项目
- Find build.properties
查找build.properties
- Modify all paths to fit the paths (and versions) in your environment
修改所有路径以适合您环境中的路径(和版本)
- Optionally you need to download and install the android sdk from here http://developer.android.com/sdk/ndk/index.html
(可选)您需要从此处http://developer.android.com/sdk/ndk/index.html下载并安装android sdk
- Open console in module root and type ant and hit enter
在模块根目录中打开控制台,然后键入ant并按Enter键
- The build process should end with something like build successfully
构建过程应该以成功构建为结束
- In the module directory, you will find the build result in the dist folder
在模块目录中,您将在dist文件夹中找到构建结果
- Open that folder, unzip the com.findlaw.c2dm-android-0.1.zip
打开该文件夹,解压缩com.findlaw.c2dm-android-0.1.zip
- A folder is created: modules/android/com.findlaw.c2dm/0.1
创建一个文件夹:modules / android / com.findlaw.c2dm / 0.1
- copy the content of modules/android/com.findlaw.c2dm/0.1 to the folder [your_project]/modules/android/com.findlaw.c2dm/
将modules / android / com.findlaw.c2dm / 0.1的内容复制到文件夹[your_project] /modules/android/com.findlaw.c2dm/
- Copy timodule.xml to the root folder of your project (where the tiapp.xml is located)
将timodule.xml复制到项目的根文件夹(tiapp.xml所在的位置)
- Open tiapp.xml and replace all occurences of com.findlaw.c2dm with your app id, except of the line including this: com.findlaw.c2dm.C2DMReceiver
打开tiapp.xml并将com.findlaw.c2dm的所有出现都替换为您的应用程序ID,但以下行除外:com.findlaw.c2dm.C2DMReceiver
- Register the module in tiapp.xml:
在tiapp.xml中注册模块:
<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
For more check this communication of our team member... 有关更多信息,请检查我们团队成员的沟通方式...
Your Module folder should not inside the Resource folder 您的模块文件夹不应位于资源文件夹中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.