Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android : Is JDBC supported in Android devices?

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?
like image 959
sachi Avatar asked Apr 02 '13 04:04

sachi


1 Answers

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

like image 71
Behnam Avatar answered Sep 21 '22 21:09

Behnam