简体   繁体   English

使用Delphi xe7将文本从Windows操作系统发送到Android设备

[英]Send text From Windows OS to Android Device using Delphi xe7

I have a Delphi XE7 app pushing a notification from Windows to my Android devices using Kinvey and GCM and it's working fine. 我有一个Delphi XE7应用程序,使用Kinvey和GCM将Windows的通知从Windows推送到我的Android设备,并且运行良好。 Now I wanted to do the reverse way sending text/object from Android devices to my Windows machine. 现在,我想以相反的方式将文本/对象从Android设备发送到Windows计算机。 Is there a way to use the same method like I did, or there is another that I should know? 有没有办法像我一样使用相同的方法,或者还有其他我应该知道的方法?

You can run a HTTP or HTTPS server on your Windows system which can be reached from the clients. 您可以在Windows系统上运行可以从客户端访问的HTTP或HTTPS服务器。 HTTP / HTTPS ports are usually not blocked, which makes this more firewall-friendly than other protocols. 通常不会阻塞HTTP / HTTPS端口,这使它比其他协议更易于防火墙使用。 Android clients then can use Indy (TIdHTTP) to send HTTP/HTTPS requests to the server. 然后,Android客户端可以使用Indy(TIdHTTP)将HTTP / HTTPS请求发送到服务器。 For the HTTP server you can use Indy TIdHTTPServer class. 对于HTTP服务器,可以使用Indy TIdHTTPServer类。

If you want bidirectional connections, where the server can use the HTTP connection to push data to the connected clients directly, there is the WebSockets HTTP extension which uses the same ports. 如果需要双向连接(服务器可以使用HTTP连接将数据直接推送到所连接的客户端),则可以使用WebSockets HTTP扩展,该扩展使用相同的端口。

For transport layer security (HTTPS) you can use a Apache or nginx reverse proxy, or the Indy SSL IOHandler. 为了实现传输层安全性(HTTPS),可以使用Apache或nginx反向代理或Indy SSL IOHandler。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM