Run Android App against a localhost API

Sachin Kumar
2 min readSep 20, 2020

In this article, I want to share my experience while developing an API for my Android App using Spring boot Framework and for the database using PostgreSQL. I have developed all the required APIs but when I was trying to use in my Android App, I thought to deploy them on AWS but wait why not access them on the actual testing phone using the local webserver which is running on my computer because so far I haven’t developed my Android App and why should I exhaust my AWS limit.

Hence, I can deploy them later once I have developed our Android App completely.

But the question is how we can access all those APIs on our emulator and Android App.

Let’s first get acquainted with the API which we want to access:

http://localhost:8090/total-received-appointments/

This is the POST request type microservice and in BODY we are passing:

Response:

--

--

Sachin Kumar

Senior Java Backend Dev | Expertise in Java Microservices, Spring Boot Framework & Android apps development.