Results 1 to 2 of 2
- 08-07-2011, 08:52 PM #1
Android apps that connect to the network
I had a question about the way certain android applications work.
In terms of how an application that pulls data from a database server to display to the user, and can also accept user info, and push it back to the server, is it likely that they have some sort of web service running on their servers that accepts requests for info, and sends that info back?
I have used soapUI in the past to query a webservice, so you have a soap formatted request, and you get a response back from the server in a certain format. So if I wanted to have an application that people who use my app are the ones updating the database with information, and other users pull that data down when they do an 'update' or something similar, is that how it would work.
Does anyone have a simple example of how (programatically) an android app that interacts with an application/database server to get data would work? Just want to see how that request/response looks in an android environment.
- 08-07-2011, 09:21 PM #2
I am in design phase of a similar web app. I thought a little bit about this problem.
My web app will get information from several clients: windows, linux, android, iphone. In its early versions, there wont be a need to have two way communication except logging in and getting session id or key for further commands. But for future versions, server will push things to the client side.
So i would love to have a standard way to do this two way communication for all platforms. But it looks like each mobile platform has its own easy to use apis/solutions. For example check Channel API Overview (Java) - Google App Engine - Google Code If you search internet you should find examples for android + google app engine + channel api.
Without such easy to use advanced apis i think you can develop your REST api. When a client logs in, it sends its IP address and opens a port to listen connections from the server. If server needs something to send to the client, it can lookup the client ip and send data by connecting the open port on the client. But this is too low level. I think using platform specific libraries to handle push notifications is the best way at the moment. But in the future, i am expecting to see some open source libraries doing this in an platform independent way.
Actually, based on what i read, it looks like XMMP can be used s a platform independent protocol/library for this purpose but i am not sure.
- By madroadbiker in forum AWT / SwingReplies: 8Last Post: 06-02-2011, 06:40 PM
- By BrainCrasher in forum AWT / SwingReplies: 0Last Post: 05-05-2011, 09:34 AM
- By ddatta8 in forum Web FrameworksReplies: 0Last Post: 02-28-2011, 10:58 AM
- By ddatta8 in forum Advanced JavaReplies: 0Last Post: 02-28-2011, 09:16 AM
- By lse123 in forum NetworkingReplies: 7Last Post: 05-02-2010, 10:35 PM