Posted in 01/02/2012 ¬ 00:52h.marco
After implementing GPS support for QGIS on Android I’ve implemented a plugin that reads the internal compass readings and shows the value in a small dock widget. 
All theese new features are available in the master-alpha4 version and the nightly.
Hope you enjoy
Posted in 31/01/2012 ¬ 00:51h.marco
Lately I’ve been working on adding native GPS support to QGIS on Android, here is a short video showing how it works. A big thanks goes to the municipality of Schoten in Belgium which sponsored the developement. This functionality is included in the latest nightly builds as of yesterday.
GPS tracking on QGIS for android from Marco Bernasocchi on Vimeo.
Posted in 14/12/2011 ¬ 11:17h.marco
Yesterday, thanks to Prof. Mauro De Donatis who invited me, I held a 2h talk at the Università degli Studi di Urbino about QGIS and QGIS on Android. The talk was attended by around 50 students and staff from Computer science, Geology and Ambient sciences.
I liked finally holding my first speech in Italian, although i felt more comfortable with English slides 
Here you can find the slides. Thanks a lot to Tim Sutton Sutton for letting me use part of his QGIS for Humanity presentation
and here a little demo of the offline plugin at work:
QGIS Offline editing plugin on ANDROID from Marco Bernasocchi on Vimeo.
Posted in 23/11/2011 ¬ 14:17h.marco
While porting QGIS to android using necessitas I encountered the problem of versioned libs. Android does not support versioned libs and it is not going to. In the first vesions I used rpl -R -e libqgis_core.so.1.9.90 "libqgis_core.so\x00\x00\x00\x00\x00\x00\x00" $APK_LIBS_DIRand similar hacks to remove the version from the libs. But it was rather hacky. Then I found this post by Tom Russo where he mentioned how he changed his build process to force non versioned libs. I wrote him with some questions and finally, thanks to his hints, I managed to create a fairly general patch for libtool to make it generate android compatible configure scripts. I sent the patch to libtool and we’ll see what they think.diff --git a/m4/libtool.m4 b/m4/libtool.m4
index a9e20cf..a5cc8eb 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2642,8 +2642,17 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ case $host_os in
+ # This must be Linux Android ELF which has no support for versioned libs.
+ linux-android*)
+ library_names_spec='$libname${shared_ext}'
+ soname_spec='${libname}${shared_ext}'
+ ;;
+ *)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
Now, the problem is that this patch fixes libtool.m4 which is the file that is used when a project manager creates a configure script. So it will take time until libtool includes the patch, your project manager updates the configure script and so on. But, no problem, mean while you can just look for something similar in your configure file (I was very lucky using “this must be linux ELF” as search criteria) and replace it accordingly and reconfigure passing –host=arm-linux-androideabi (as you probably already do if you are reading this). I managed to crosscompile expat, gdal, geos, gsl, proj, libiconv and libcharset without version.
QGIS uses libpq (postgres client) to connect to some services, but there is no hint in the configure script about soname_spec and library_names_spec, so I searched for SO_VERSION and found it set in Makefile.shlib and adapted it accordingly. Bottom line is that you need to search creatively for anything related to soname, SO_VERSION and similar.
QGIS uses as well QWT, which is QMAKE based, in this case to generate non versioned libs it’s enough to add CONFIG += plugin to the .pro or .pri file.
Finally, in CMAKE you need IF (NOT ANDROID)
SET_TARGET_PROPERTIES(qgis_core PROPERTIES
VERSION ${COMPLETE_VERSION}
SOVERSION ${COMPLETE_VERSION}
)
ENDIF (NOT ANDROID)in your CMakeList.txt and call cmake with -DANDROID
Hope this helps and that more and more people port cool libs to android.
Ciao Marco
Posted in 01/10/2011 ¬ 03:39h.marco
Today, for some bizarre reasons only my android phone was connecting to a WiFi. So I decided to use it as a tethered modem. The problem was that my friend Bruno could not use the net either, so since networkmanager ad-hoc networks were not working and it is our day off climbing we decided to keep our fingers trained on the keyboard. (more…)
Posted in 24/08/2011 ¬ 03:06h.marco
So, it is over, after 3 months working on QGIS for android as a Google Summer of code project it is now time to wrap up what I did and didn’t do.
First of all a QGIS android app exists now and it has many features including:
- reading/writing projects
- raster support
- spatialite support
- wms support
- (apparent – untested) wfs and postgress support
- partial shape files support (string attributes still chrash the app)
- Fully functional gui (SymbologyV2 doesnt work yet)
- (all?) core C++ plugins beside globe (any takers?
Further more I created a series of build scripts that make it easier to set up a dev environement.
Unfortunately I didnt manage to implement live GPS tracking and a larger gui optimisation, but all in all I’m very happy with the results and seeing that few peoples are already testing it. Soon ill publish a video.
cheers
Marco
Posted in 21/08/2011 ¬ 12:03h.marco

Just a quick screenshot to show that qgis on android is now a working reality. Tomorrow I’ll make a video and so on. The major missing thing now is reading shp files ad maybe spatialite… maybe tomorrow. Now it’s sunday
Ciao
test it now: 
Posted in 20/08/2011 ¬ 22:56h.marco


Today I loaded the first data into qgis and although the mapcanvas stays black, in the map composer the data is shown. Here some screenshots.
Posted in 20/08/2011 ¬ 09:11h.marco
See my last posts. In short I managed to get qgis packaged as an apk and to properly run with only one major problem. The map canvas is always black. I ll investigate this till Tuesday.
Cheers
Posted in 19/08/2011 ¬ 23:43h.marco
After finishing with the gui(see previous post) i started testing the data providers.reading and writing shp files always ends in an app crash. Loading rasters, wms and gpx seems to work but the mapcanvas is never drawn. I have to investigate why. But probably it has to do with the draw used in qgis. The properties are there and get updated, but the canvasstays black. The same happens with decorations plugins like north arrow and copyright.
Next things i want to check is the shape error and the canvas problem. Then probably sqlite and gps.
Ciao Marco