From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/installation/build_android_jdbc.html | 229 ++++++++++++++++++------------ 1 file changed, 136 insertions(+), 93 deletions(-) (limited to 'docs/installation/build_android_jdbc.html') diff --git a/docs/installation/build_android_jdbc.html b/docs/installation/build_android_jdbc.html index 11d31974..9ab30ca5 100644 --- a/docs/installation/build_android_jdbc.html +++ b/docs/installation/build_android_jdbc.html @@ -14,15 +14,17 @@ -

- Having built the JDBC driver, you can now use it with your project. - You can do this using Eclipse and the ADT plugin, which you can get - from here: +

+ Having built the JDBC driver, you can now use it with your + project. You can do this using Eclipse and the ADT plugin, + which you can get from here:

- http://developer.android.com/sdk/eclipse-adt.html + http://developer.android.com/tools/sdk/eclipse-adt.html

-

+

To make sure everything is working:

  1. -

    - Start Eclipse and create an Android project. Use: +

    + Start Eclipse and create an Android project. Use:

    • - test_jdbc as the Android project - name. + test_jdbc as the Android + project name.

    • @@ -183,18 +221,18 @@ $ <ndk-install-directory>/ndk-build

    • -

      +

      For the package name, use - example.jdbc. + example.jdbc.

  2. -

    - This results in an empty code file. Copy and paste the - following example code into that file: +

    + This results in an empty code file. Copy and paste + the following example code into that file:

    package example.testjdbc;
     
    @@ -285,8 +323,8 @@ public class Test_jdbcActivity extends Activity {
     } 
  3. -

    - Copy the following files into place: +

    + Copy the following files into place:

    $ cd <workspace>/test_jdbc
     $ mkdir -p libs/armeabi
    @@ -295,18 +333,16 @@ libs/armeabi
     $ cp -r <db>/build_unix/jdbc/sqlite.jar libs
  4. -

    - Back in Eclipse, right click the project name, and select - the refresh option to reload the project - from the directory. The two new files that were copied into - place in the previous step are now included in the project - view. +

    + Back in Eclipse, right click the project name, and + select the refresh option to reload + the project from the directory. The two new files that + were copied into place in the previous step are now + included in the project view.

  5. -

    - Convert the JAR file to the Android Dalvik format: -

    +

    Convert the JAR file to the Android Dalvik format:

    1. @@ -316,7 +352,8 @@ $ cp -r <db>/build_unix/jdbc/sqlite.jar libs
    2. - Choose Build Path -> Configure Build Path + Choose Build Path -> Configure + Build Path

    3. @@ -325,39 +362,42 @@ $ cp -r <db>/build_unix/jdbc/sqlite.jar libs

    4. -

      - Click Add JARS. +

      + Click Add JARS.

  6. -

    - Run the project: +

    + Run the project:

    1. - Choose Property -> Android - and select any one of the usable build targets. + Choose Property -> + Android and select any one of + the usable build targets.

    2. -

      - Right click the project. Choose Run As -> Android +

      + Right click the project. Choose + Run As -> Android

  7. -

    - Verify your installation. After a short pause (depending - on the speed of your system), the application logo is - displayed. Use the Android adb command line application to - make sure the application is running as expected: +

    + Verify your installation. After a short pause + (depending on the speed of your system), the + application logo is displayed. Use the Android adb + command line application to make sure the application + is running as expected:

    $ cd <android-sdk>/platform-tools
     $ ./adb logcat
    @@ -368,9 +408,9 @@ I/System.out(  539): French_Roast   8.99
     I/System.out(  539): Espresso   9.99
     I/System.out(  539): Colombian_Decaf   8.99
     I/System.out(  539): French_Roast_Decaf   9.99
    -

    +

    You can also check if the database - (example.db) exists in the + (example.db) exists in the emulator:

    $ ./adb shell ls /data/data/example.testjdbc
    @@ -378,7 +418,8 @@ example.db
     example.db-journal
     lib 

    - Finally, check the database using the BDB SQL shell: + Finally, check the database using the BDB SQL + shell:

     $ ./adb push <db>/build_android/jdbc/libs/armeabi/dbsql \
    @@ -414,11 +455,13 @@ dbsql> .quit 
     Next - Chapter 4. Building Berkeley DB for Android  + Chapter 4. Building Berkeley DB for + Android  Home -  Android Configuration Options +  Android Configuration + Options
-- cgit v1.2.1