Skip to content

kristina-hager/Spatialite-Database-Driver

Repository files navigation

Spatialite-Database-Driver

I created Spatialite-Database-Driver to enable the usage of spatialite android in Android applications in more recent Android Studio (v1.3) build environments.

See HelloToSpatialite for an example of using this module in a simple spatialite application.

The shared objects and source files in this repository are not mine. They were copied from other sources as explained next. My contribution here is figuring out how to package this library up in the relatively new Android Studio environment and how to use it in a separate application.

The original sources

I copied the shared objects from geopaparazzispatialitelibrary/libs

and the java jsqlite code from geopaparazzispatialitelibrary/src/jsqlite

Why a standalone library?

Many Android apps today use libraries and lots of the time libraries are embedded in those apps instead of being separate components.

I wanted to make this library a separate component to make it easier for everyone to download it and use it in their own apps.

Key points in setting this up

Setting up a generic Android module

I followed these two posts to create that standalone module since it is not something Android Studio does for you automatically:

I followed the steps in the first link except for step 2 where I had to refer to the second post to know to rename the folder at the terminal and drag the build.gradle.

In this repository, Credits.java shows a vanilla example of java that you might see in a module.

There is a lot you can do in a module, of course, beyond this.

Setting up jsqlite in this module

I copied the contents (shared objects in their architecture specific folders) from:

to

I copied the jsqlite java from:

to:

Important! I had to remove the 'mycompany' scoping from the AndroidManifest to enable projects using this module to invoke 'import jsqlite;'.

Now the library is ready to use!

Any project wishing to use this module will need to take some steps as shown in HelloToSpatialite.

Credits

Some articles I found useful during this work as they explained some concept I needed to understand:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages