Wangling I'm Wang Ling. I'm wangling you.

Android

What’s good about selectionArgs in SQLite queries

The Android API for querying SQLite databases supports two styles of queries: query(uri, projection, selection = "column=" + value, selectionArgs = null, sortOrder) query(uri, projection, selection = "column=?", selectionArgs = { value_as_string }, sortOrder) Obviously, the first one is more straightforward and convenient. Then what’s good about the second one? Let me try to sell [...]

Why it is impossible to intercept incoming calls on Android

For last several weeks, I’ve been struggling to intercept (not only get notice of) incoming calls on Android, but finally I have to admit that I failed. Actually, I’m doomed to fail, because it is just Mission Impossible. For the time being, a BroadcastReceiver for “android.intent.action.PHONE_STATE” is the only chance for application developers to generally [...]

How content changes of ContentProvider propagate to ListView via Cursor

I know there must be an { Observable->Observer, Observable->Observer, … } chain from ContentProvider to ListView (or general AdapterView), but I didn’t know how exactly this chain is composed. I put by the itch to untangle the knot until recently I set out to implement an OrderedMergeCursor1, which should be a subclass of MergeCursor that [...]