Reputation: 630
I've been given the task to modify an Android app. It uses an API which is on the main server and right now I don't have access to it. In the source code I changed the URL of the API from
private static String URL = "https://website/App_API/index.php";
to
private static String URL = "http://localhost/App_API/index.php";
in order to make a few tests but after the change the application says that "No internet connection is available". Anyone who has any suggestions how to access the local API?
Upvotes: 0
Views: 101
Reputation: 384
to access the localhost you have to use ip instead ie
String URL = "http://10.0.2.2/App_API/index.php";
Upvotes: 0