Delphi XE5中的Google Cloud Messaging? [英] Google Cloud Messaging in Delphi XE5?

查看:270
本文介绍了Delphi XE5中的Google Cloud Messaging?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android应用程序,我正在考虑移植到Delphi,但我看不到与GCM进行接口的方法。我想我可能必须在java中运行GCMBaseIntentService并与delphi共享对象进行接口?

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 GCMBaseIntentService in java and interface with the delphi shared object?

或者,我正在寻找一种在Delphi Xe5 android应用程序。

Alternatively, I am looking for a way to do push notifications in a Delphi Xe5 android app.

推荐答案

使用JNI与Delphi接口Java。 JNI允许您双向调用:Java到Delphi或Delphi到Java。因此,您可以使用 Java类扩展您的Delphi应用程序。

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.

为了在Android上实现您想要的内容,在Java中执行此操作将是更容易的跟踪路径,因为一些可用的示例完全符合您的想法。只需看一下:

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

为了界面Java JNI和Delphi,您可以按照详细步骤进行操作,从而允许顺利沟通您应用程序的前端和后端。

To interface Java JNI and Delp 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.

这篇关于Delphi XE5中的Google Cloud Messaging?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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