Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do Mobile Apps communicate with a server?

Tags:

mobile

How do Mobile Apps communicate with a server? Does this communication happen over HTTP or are there other methods (for instance, I guess a mobile app could open a socket)? Does this differ form device to device? Is there one most commonly used approach? If the communication happens over HTTP how do the URLs look like? Is there a way to identify the app based on the the "User Agent" in the HTTP request if the communication is happening over HTTP?

like image 594
Nikhil Avatar asked Jan 19 '23 12:01

Nikhil


2 Answers

Mobile Apps can communicate with a server in many ways. Mobile apps can also use other features of the mobile. For instance SMS , MMS. Its pretty open really. Your question could be "how do computers communicate with a server?".

A mobile app can be a simple as loading a web page. This would be http.

The problem with mobile apps. They run on phones. There are lots of different phone manufacturers and its up to them (in some case the mobile phone operators also have weight) what to allow the programmer to do by the choice of operating system.

If you are getting started with mobile apps. Take a look at android its pretty simple to get going with if you know a little about programming.

As for the useragent. It depends but usually if you are using the http api on the phone, you can set the user agent to what ever you want it to be, its just a string.

Hope this helps!

like image 67
Ed_ Avatar answered Jan 28 '23 11:01

Ed_


Communication usually happens over http. Applications usually identify themselves in the User Agent field

like image 33
user717401 Avatar answered Jan 28 '23 10:01

user717401