简体   繁体   中英

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. Now I wanted to do the reverse way sending text/object from Android devices to my Windows machine. 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. HTTP / HTTPS ports are usually not blocked, which makes this more firewall-friendly than other protocols. Android clients then can use Indy (TIdHTTP) to send HTTP/HTTPS requests to the server. For the HTTP server you can use Indy TIdHTTPServer class.

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.

For transport layer security (HTTPS) you can use a Apache or nginx reverse proxy, or the Indy SSL IOHandler.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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