0

I want to code an Android client and a Windows.exe server application (possibly PHP., I am still trying to decide).

I have no problem with developing the server app, but have not yet done any Android coding. Mostly, though, I am unsure about how to communicate between client and server.

A client aapp will login to the server then at regular intervals send its location (GPS coords) to the server which will store the data in a MySql database,

A second Android app will display a historical trail of where the first user has been using Google maps, plus a little more functionality.

Since I am not serving HTML, I am wondering whether to use HTTP GET / POST or a proprietary protocol over TCP/IP. I would like to encrypt it, so SSL seems in order,

Is there any compelling reason to use one or the other of use HTTP GET / POST or a proprietary protocol over TCP/IP?

Would coding my Android app be easier if I used JSON as my data format (or something else?), irrespective of the protocl used to transfer the data?

Hmmm, since much of the data returned as a response to GET by one of the apps will be data used to draw a Google map with a series of points showing travel, could I do the heavy duty processing on the server & return the HTML (or JS) necessary to display it an dhave the app embedd a browser in its UI to display the map? (the UI will also disply more, but maybe I shoudl just make it browser based HTML & JS, rather thn an actual Jav Android app? As you can see, I am confused)


[Update] I want to code both the clients and the server and to host the MySql database. I would prefer no 3rd party frameworks unless they are excedding simply to use and play very well together with Delphi or PHP.

4

3 回答 3

1

I would strongly recommend the use of the newest Google Play Services with the Google Cloud Messaging... It takes out of you all that work.

Check out, see if you like ;D

Google Cloud Message: http://developer.android.com/google/gcm/index.html

There is also a great video of this year's Google I/O about the maps improvement on Google Play Services:

https://developers.google.com/events/io/sessions/325172829

于 2013-06-15T09:48:36.377 回答
1

Are you trying to create App that can be delivered from Google Play Store or a Andriod enable Web application? You Question is confusing in your need. If you are looking to create Andriod Apps then definitely PHP is not going to serve it up. Look for Andriod SDK and create your interface using that, then for Windows Server EXE you can do PHP based API or as suggested by other answers. But for User interface PHP is no. You need to read and understand the different between APP and Web App. or your question is not very clear on topic.

于 2013-06-15T10:01:34.270 回答
1

I may recommend you to use Wcf with poco entity that provide you security as you want and create client in android to consume it.here is simple example of using wcf in android-http://fszlin.dymetis.com/post/2010/05/10/Comsuming-WCF-Services-With-Android.aspx

于 2013-06-15T10:41:33.403 回答