Saturday, March 27, 2010

Finally, searching introduced in 0.8!

A long-awaited feature is coming in 0.8, which is word-searching.

By the way, the comments I received via Android Market and via the feedback menu is very encouraging, that allows me to continue developing the app.

However, implementing the search function is not an easy task. I wonder how to make it fast enough without introducing a big overhead to the apk (downloaded installer) size.

At the end I decided to use the FTS3 (full-text search) that is included in SQLite library which is already built-in to all Android devices. The downside is that I need to create another database for the full-text search to work, and it needs time, too.

So when the user clicks on the search menu, there will be a dialog explaining that he needs to create a file on the SD Card for the index.

For search function, you need an index. Index needs about 9MB on the SD Card, ... and so on

The indexing takes a while, on my Nexus One it takes almost 5 minutes to complete (I got an Android device finally, thanks to Google's developer day where they gave out Nexus One phones).

Creating index... Phase 5: Inserting 1500 of 31102 verses

After indexing, searching for a word takes only a fraction of a second! I'm very happy with this ^^

Searching for "israel" and "Jacob", words need to be exact but don't need to be consecutive

A special thanks to the id-android community, where they for the first time become testers of unreleased versions of the Bible app. They made me sure that the app is ready for release ^^

Download rate has increased to about 10 per day, up from 4 a day when 0.5 was released ^^

Monday, March 15, 2010

Direct verse addressing in 0.7

One of the problem I found in 0.6 is that it is very slow to go to different parts of the Bible. You have to select the book from the dropdown menu, type in the chapter number using the on-screen keyboard (or hardware one if you have one), click the verse and type the number again.

So in 0.7 I want to release something very useful (at least for me): just type the verse address, something like "1 pet 3:16" or, even better, "1 pe 3 16", "1p3 16", "1p3.16" and other alternatives must also be accepted.

So with God's grace I managed to write a quite complicated logic to recognize those patterns. At first I wanted to use regular expressions, but I'm afraid that I will get stuck somewhere.

Jumping to John 3:18
Another feature is bookmarks. You can hold on a verse and a popup menu will be displayed. From there you can add bookmark. When you select menu -> Bookmarks, the following appears. The bookmark stores the verse address, a snippet of the verse, and the date it was last added (since duplicates will update the date stamp).

Bookmark screen
Something big is missing: search! How if I remember some verse about Jesus building church on the rock but I don't remember where it is?

I think that's another big thing, but I can't do it for this version. It's too risky.

Friday, March 5, 2010

Preparing for 0.6 from user feedbacks

I received many feedbacks from both the program interface and my friends when I see them operating the program. There are several things that I learned.

The Go To interface for navigating is too small for fingers! I didn't know this until I really try it on a device. This is the first time I learned that touch screens needed some special handling. So here is the improved version of the Go To screen. The finger now can touch the chapter and verse numbers easily.

Bigger buttons everywhere!

Then, I changed the text display from a single TextView to ListView items. Surprisingly it is much, much faster to load a new chapter, because only items visible need to be rendered.

Almost useless about screen. The number after the version is the internal versionCode.
A new thing in this version is the brightness of the text that can be selected on Settings. I used this as the basis. Thanks for sharing the code.

Text brightness in percentage of maximum