I have an application in Android which get latitude and longitude from GPS. I want to send these lat and long to server at particular port and want to receive the response of server into my Android application.
Kindly give the direction so that I can make it possible.
Client/Server communication involves two components, namely a client and a server. They are usually multiple clients in communication with a single server. The clients send requests to the server and the server responds to the client requests.
Types of Client Server Communication are: HTTP Push and Pull. Ajax Polling. Long Polling.
In an OutSystems Mobile application, all the communication between the app and the Platform Server is done through REST calls. All the calls to Aggregates/Data Actions and Server Actions in Mobile modules will have REST endpoints generated automatically by the platform.
There are many ways to perform this data transfer using the Android platform.
My preference is to use JSON to communicate between the App and the server. For an example of how to implement this in your app read through this article: http://www.josecgomez.com/2010/04/30/android-accessing-restfull-web-services-using-json/
If you want to upload some information to web server, simple way is to use GET method in your web server part. you may pass two parameter latitude + longitude to server.
Second thing is to communicate with server to mobile device. Better way is to use JSON format to communicate between them. Try to understand the JSON format and implement it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With