Android : Is JDBC supported in Android devices

androidjdbcMySQLphpmyadmin

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:

  1. Do Android devices currently support JDBC?
  2. Will Android 2.2 support JDBC?
  3. If supported, which Android versions will support JDBC?

Best Answer

Yes. You must remember to put your JDBC connection code in an AsyncTask, otherwise you will BURN BURN BURN!