How do I connect an Android device to a PC, laptop, or server?
I have finished my Android program using Eclipse. I also use a client – server system (I’m using MySQL, not SQLite, to store my database)
when I run my program in emulator, it runs nicely (using CustomHTTPClient with address to connect MySQL is http://10.0.2.2/android/blablabla.php)
But, will it be the same code to connect to a MySQL database when I deploy the app onto a real device? if no, what should I do to connect the device to my database(MySQL) in my PC/Laptop/Server? How should I change the code?
I don’t use Bluetooth because the distance is too short.
You could use your computers IP address. Find this by tpying ‘ipconfig’ into the command prompt. Look for and use your IPv4 address, it should be similar to: