I have to create an application in Android the gets from the GPS some data that needs to be stored in a DB at a Java server.
The problem I’m facing is that I don’t know what protocol to use for connecting these devices.
Some say that I should use TCP/IP .Has anyone any clue why is this better than any other protocol? like http for example or any web service?
What I need to send between these 2 devices is some
objectsof this type:
class Date{
String s1;
String s2;
Float f1;
int i1;
}
So, I’m sending on the remote side objects of this type: d1=new Date(); continously.
I mean that the data comes from a moving object….which moves about 8 hours a day…So during those 8 hours at intervals of 5-10 minutes I’m sending data!
Which is better and why?:D
Thank u!
That’s still a bit of a subjective question as there could still be a number of ways to do this.
In light of your edited question with the data which needs to be sent and the frequency (5-10 minutes), I’d suggest you look at implementing a simple HTTP service (listener) for the server end and simply pass the data using JSON.
Coding for both of the above is relatively simple.