When you're developing an application that needs to use a custom, native precompiled library (the .a file) together with your gluing JNI interface maybe you're wondering how to link it.
It's fairly simple and you can even make it target architecture aware (separate precompiled libraries for arm, arm-v7a, x86).

Continue reading...

Foreign keys on database serve the purpose to enforce constraints, to maintain database integrity. Another purpose is that way one may implement "table inheritance" in SQL. You place common set of data in one table, specific info in set of tables and binding them via a foreign key. On Android most common way to operate on SQLite is to derive a class from `SQLiteOpenHelper`

public class ContentHelper extends SQLiteOpenHelper {
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(some create table string);
    }

    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    }
}
Continue reading...

Recently one of our test engineers asked if it would be possible to embed an increasing build number on "About" page in our mobile app. The purpose of such build number is to have a single reference point when reporting failed test suites or new problems in issue management tool (eg. Bugzilla). It is like a dogtag for software: useless for normal users and in daily use -- but much needed in case of emergency. And crashing software is an emergency.

At office we are not using any kind of continuous integration server (like Hudson CI) or separate build scripts for small projects. Such servers/scripts are usually configured to create build numbers themselves. For our purpose builds are prepared either by developer or tester in development environment and shared.

Continue reading...

Recently, when playing with adding OpenID support to one of Android programs - namely Tracks - I have faced a simple problem.

When using OpenID, one has to delegate authentication to some 3rd party website. This is OpenID Provider. Thanks to this our application (the Relaying Party) does not have to know identifier/password and user authenticates himself on a page he knows. Nor do we have to maintain the security of these in application.

So I've started looking at JOpenID.

Continue reading...

In last post I’ve written a recipe how to connect from Linux to Microsoft SQL Server Express using ODBC. Now, since I’m using Qt framework for app portability, it is the time to do the same on Windows.

One can connect two ways to MS SQL: using ODBC or *[TDS]:”Tabular Data stream” - SQL Server’s native protocol. With new release of Qt SDK there is a QSqlOdbc4 driver bundled. No TDS driver is available for Microsoft’s native protocol.

Continue reading...