local host api access from Android device
<p>I have created an API in C#, Visual studio and it is running on my <code>localhost</code> with address <code>http://localhost:xxxxx/api/allproduct</code>.</p>

<p>I have also created an Android app in Android Studio and tried to access the above API. I am debugging my app using data cable (Not by emulator). I am not able to access the API. </p>

<p>I used <code>chrome://inspect/#devices</code> and with the help of port forwarding I am able to access api in my mobile's browser. But when I am trying to connect this API through code (app code in Android studio), it is telling "could not connect to <code>http://localhost:xxxxx/api/allproduct</code>".</p>

<p>Any one Please suggest any alternate. </p>