I am doing an Android application using JDBC to send data to database without using any web services. I did an experiment using Android 2.2 emulator and I am able to send data to MySQL DB (LOCALHOST). After that I tried to send using Android 2.2 device, I changed the path from
jdbc:mysql://10.0.2.2:3306/
with jdbc:mysql://xx.xx.xx.xx:3306/
.
xx.xx.xx.xx is from ipconfig
of my localhost machine. But it is not working in the device. What could be the reason.
Main doubts:
Yes. You must remember to put your JDBC connection code in an AsyncTask
,
otherwise you will BURN BURN BURN!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With