Google Cloud Messaging in Delphi XE5?

前端 未结 4 1992
无人共我
无人共我 2020-12-02 21:11

I\'ve got an android app that I am thinking about porting to Delphi but I can\'t see a way to interface with GCM. I am thinking I would possibly have to run the GCMBaseInten

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 21:14

    You interface Java with Delphi using JNI. The JNI allows you to call in both directions: Java to Delphi or Delphi to Java. So you can extend your Delphi applications with Java classes.

    For implementing what you want on Android, doing it in Java will be the easier path to follow, as some available examples do exactly what you have in mind. Just have a look:

    • Implementing Push Notification / Google Cloud Messaging for Android
    • Android* Client App Using Cloud-Based Alert Service
    • Github Gist - GCMIntentService.java

    To interface Java JNI and Delphi, you can follow detailed steps, thus allowing a smooth communication between front end and back end of your application.

    If you decide to re-use some of the code, remember to give appropriate credit to the authors.

提交回复
热议问题