android - Appcelerator Titan 使用 C2DM 推送通知?

标签 android titanium push-notification appcelerator-mobile

我正在使用 Appcelerator Titanium 版本 1.8.0,有人尝试过使用 Google 的 C2DM 推送通知吗?请帮助我创建示例推送通知。

最佳答案

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

  1. Clone project from github
  2. Find build.properties
  3. Modify all paths to fit the paths (and versions) in your environment
  4. Optionally you need to download and install the android sdk from here http://developer.android.com/sdk/ndk/index.html
  5. Open console in module root and type ant and hit enter
  6. The build process should end with something like build successfully
  7. In the module directory, you will find the build result in the dist folder
  8. Open that folder, unzip the com.findlaw.c2dm-android-0.1.zip
  9. A folder is created: modules/android/com.findlaw.c2dm/0.1
  10. copy the content of modules/android/com.findlaw.c2dm/0.1 to the folder [your_project]/modules/android/com.findlaw.c2dm/
  11. Copy timodule.xml to the root folder of your project (where the tiapp.xml is located)
  12. 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
  13. Register the module in 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

更多信息请查看this communication我们的团队成员...

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

enter image description here

关于android - Appcelerator Titan 使用 C2DM 推送通知?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9799488/

相关文章:

android - 无法使用 Volley 显示两个自定义 ListView

android - 信号强度中的负dbm是什么意思?

ios - 应用商店拒绝 iOs 10 上 IPV6 网络支持的应用

php - 收听数据库插入并向 Android 设备发送推送通知

python - PubNub - 推送 HTML 更新

android - 升级到 FirebaseUI 3.0 后无法使用 FirebaseRecyclerOptions 检索数据

java - 在 Android 中同时读取多个 NFC 标签

twitter - 钛从我的应用程序中发送推文

iphone - 对于 "Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted."该怎么办

ios - SNS Push Notification Service 多线程发布API 2秒发布10万条消息