title: SQLDroid JDBC driver for Android
body: <p>I need to use a database on an Android application, since when in use the user won't have internet access. For that, I want to do a connection to the database via JDBC with SQL Lite. After some research I found out that it is not supported by the Android API, but there is project which does just that: <a href="http://code.google.com/p/sqldroid/" rel="nofollow">SQLDroid</a></p>
  
  <p>I downloaded the jars and followed the main tutorial, but I keep getting an sql exception <code>java.sql.SQLException: No suitable driver
  </code> when i want to create the connection with the DriverManager. </p>
  
  <pre><code>String url = "jdbc:sqldroid:" + "/data/data/com.mypackage.droid" + "/main.sqlite";
  Connection con = DriverManager.getConnection(url);
  </code></pre>
  
  <p>What am I doing wrong? 
  By the way, my activity has the name "AndroidActivity" and the package is called com.mypackage.droid. </p>
  
  <p>Edit: Complete code:</p>
  
  <pre><code>public class AndroidActivity extends Activity {
  
  
      String url = "jdbc:sqldroid:" + "/data/data/com.mypackage.droid" + "/main.sqlite";
      static Connection con;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          try {
              Class.forName("SQLite.JDBCDriver");
              con = DriverManager.getConnection(url);
          } catch (java.sql.SQLException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (ClassNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
  
      }
  </code></pre>