Is there any method to access the android app database from xammp server using android device using only usb cable and no other mean, like wifi and mobile network. I have gone through many articles and forums to find out this problem but haven't find anything helpful. I am trying to connect the database on localhost xampp from android device (Samsung Galaxy s 2) through my app. I have tried
127.0.0.1
127.0.0.1:80
127.0.0.1:8080
10.0.2.2
10.0.2.2:80
10.0.2.2:800
also tried my laptop ip address.
When i try to debug my app from eclipse on device, the app starts but when i click to get data (product list) from localhost the device just say that "unfortunately Myapp just stop working" and app is closed. This is when i am not using wifi on my device, but it works well when my device is connected to wifi. May be there are places when there is no wifi so in case usb option will be good.