

app.run() will host the server on localhost, whereas, app.run(host=”0.0.0.0″) will host the server on machine’s IP address.Now, if the URL “” is entered into a browser, showHomePage function will be executed and it will return a response “This is home page”. Suppose the server is running on a system with IP address 192.168.0.113 and port number 5000. is associated with showHomePage() function.Step 3: Working with the AndroidManifest.XML fileĪdd the following line inside the tag android:usesCleartextTraffic="true"> If a network call is asynchronous, the execution won’t wait till the server responds, the application will be running, and if the server responds a callback will be executed.Īdd the following dependencies to the adle file in Android Studio implementation("3:okhttp:4.9.0") This may give rise to latency or performance lag. If a network call is synchronous, the code will wait till we get a response from the server we are trying to communicate with. This library is used to make both Synchronous and Asynchronous calls.

For making HTTP requests in the Android Application we make use of OkHttp. OkHttp is a library developed by Square for sending and receiving HTTP-based network requests.


GATE CS Original Papers and Official Keys.Full Stack Development with React & Node JS(Live).Preparation Package for Working Professional.Full Stack Development with React & Node JS (Live).Data Structure & Algorithm Classes (Live).
