This is my first stackoverflow post, so hopefully I'm not too incompetent. I have a problem connecting my Android application to the PostgresDB that I created. I used the code from this tutorial http://appliedcoffeetechnology.tumblr.com/post/10657124340 . Although I changed the String url string ... as follows: String url = "jdbc:postgresql://192.168.1.101:5556/postgres?user=postgres&password=yeahright"; I followed other instructions for downloading JDBC and adding it to the package, I also added an Internet permission line.
I configured the postgreSQL database on my computer running Windows 7 to allow connections, and even set incoming connections to "trust" so that the password does not interfere. I also opened port 5556 on the Windows firewall. I can connect to it from my Ubuntu laptop using the following command: psql 192.168.1.101 -U postgres -p 5556 -d postgres However, when I run the Android application (on a real device) I get "java.sql.SQLException: there is no suitable driver" caused by calling conn = DriverManager.getConnection(url) .
Thank you in advance for your help, and let me know if I can provide any useful information.
Craig Ringer mentioned the web service application below. Initially, I hesitated because I didn’t want to add an even steeper addiction to my learning curve, but I decided to go with Django, and it was amazingly simple.
source share