I'm new to android programming so please I need your help I want to make a mobile application that connects to a databse on my laptop through internet without configuring my router I'm using phpmyadmin in which i created a database, and I made a file called login.php that can make sure of username and password from database I enabled the port 80 in firewall now i wrote in eclipse this url : http:"//192.168.1.3:80/Day%20Manager/Login.php" the ip address is optained by writing ipconfig in cmd and getting the IPV4 address well it's not working it's giving me NetworkOnMainThreadException can you help me please
Asked
Active
Viewed 1,208 times
0
-
1`NetworkOnMainThreadException` --> do network related operations in another thread. Look at [the documentation](http://developer.android.com/reference/android/os/NetworkOnMainThreadException.html) – jlordo Dec 28 '12 at 16:49
-
Also check this question: [NetworkOnMainThreadException](http://stackoverflow.com/questions/6343166/android-os-networkonmainthreadexception) – Mikita Belahlazau Dec 28 '12 at 16:50
-
1-1 for A/ poor formatting and B/ obvious lack of research – njzk2 Dec 28 '12 at 17:02
2 Answers
1
Have a look at this link. This might help. Ofcourse if you are going to need to access it from your application you would have to provide an intermediary php script to get it working correctly.
0
you said you are using phpmyadmin database, then place your php file in c:/>xampp/htdocs folder, open your browser and enter localhost/login.php then you will get output, in the same way connect to url from program then you will get the data.
note: make sure internet permission in manifest file.

Mohan
- 651
- 4
- 13