Delphi XE5 中的谷歌云消息传递? [英] Google Cloud Messaging in Delphi XE5?

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

问题描述

我有一个 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 将 Java 与 Delphi 连接起来.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:

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 中的谷歌云消息传递?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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