Giter Club home page Giter Club logo

android-spatialite's Introduction

Building the Native libraries

Download the Android NDK (latest release as of now is r5). Follow the instructions on the website. To make things easier, add the directory where you unpacked the NDK to your path:

`export PATH="$PATH:<path to your ndk directory"

You use the ndk-build script provided there to compile everything needed.

From the project root, use these steps:

$ cd jni $ ndk-build

Reconfiguring (autoconf)

Generated headers for the dependent libraries have been checked in so you should not need to reconfigure them. If you do for some reason, you may follow these instructions.

WARNING: This will likely break things as sources have been customized to work on Android.

  • Setup some environment variables to make this easier:

export JDK_HOME=<path your JDK directory>

  • Configure libiconv:

cd jni/libiconv-1.13.1; ./configure

  • Configure proj:

cd jni/proj-4.7.0; ./configure

  • Configure spatialite/sqlite3 amalgamation:

cd jni/libspatialite-amalgamation-2.3.1; ./configure

  • Configure javasqlite:

sudo apt-get install libsqlite3-dev

cd jni/javasqlite-20110106; ./configure --with-jdk=$JDK_HOME

$JDK_HOME/bin/javac SQLite/Database.java SQLite/Vm.java SQLite/FunctionContext.java SQLite/Stmt.java SQLite/Blob.java SQLite/Backup.java SQLite/Profile.java

$JDK_HOME/bin/javah -o native/sqlite_jni.h SQLite.Database SQLite.Vm SQLite.FunctionContext SQLite.Stmt SQLite.Blob SQLite.Backup SQLite.Profile

Testing

adb push test.db /mnt/sdcard/spatialite_test.db

  • Run the SpatialiteTestActivity on your phone.

android-spatialite's People

Contributors

iandees avatar mrenouf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.