[sword-devel] Android SWORD

Troy A. Griffitts scribe at crosswire.org
Wed Aug 25 22:38:42 MST 2010


Dear Ken,

Thank you for the debug.  I also have had trouble with the installer and
haven't had time to look into it.

The history is that I build Bishop as a sort of proof of concept for the
java-jni bindings for Android.  I mostly work in the engine code.  The
jni binding code I kept in SWORD SVN and the Bishop code I just backed
up occasionally to our server.  Last year my drive crashed and I lost
some work but might have pieced it all back together.  Here is an email
I sent to Gary with links to all my stuff.

______________________

After last year when I started the work I had a harddrive die on my
laptop.  I had been backing up the work regularly, but lost about 2
weeks of work in the crash.  I used a recovery tool to salvage many of
the files from the bishop project and think I may have close to what is
in the apk.  Here are my resources if you want to try to piece things
together:

Lastest binary when I stopped, dated 11-18-2009:
http://crosswire.org/~scribe/bishop.apk

Latest backup of source, dated 10-31-2009:
http://crosswire.org/~scribe/bishop-20091031.tar.gz

Latest binary after reconstructing source and I think some small new
work (I think this is built with debug symbols in the native library so
it's a little bigger):
http://crosswire.org/~scribe/bishop2.apk

Current backup of source which built the above:
http://crosswire.org/~scribe/bishop-20100804.tar.gz

Please excuse my ignorance of Android programming.  I am fumbling
through it all.

I remember having trouble with the InstallMgr.  It sometimes connects
and downloads and other times it does not.  I thought it might be the
limited memory on my G1 or some trouble with the timing of the FTP code
in the native library.  I've found serious bugs in Android's system
calls, (e.g. memccpy) and reported it to them, but they still haven't
fixed it.  I use my own version in the ftp lib to avoid the bug.  That
is where I stopped-- thinking I needed to debug this ftp intermittent
issue.  I didn't compare how well the older .apk works versus the newer
.apk.  Maybe the older version worked better?  Or maybe a newer version
of Android or new phone works better?

Let me know what you find.

Troy



On 08/24/2010 09:01 PM, Kenneth Arnold wrote:
> I just got an Android phone, and after seeing the state of Bible
> software currently available, I'm excited about helping develop a good
> SWORD-powered Bible reader for it. I installed Troy's bishop2.apk and
> tried to download a module... fail (logcat at end of message). So I
> went looking for the code to see if I could track down the problem...
> but I haven't found any source code anywhere. Is that intentional, or
> am I missing something?
> 
> As a user (previously of Laridian on WinMo), I've made this list of
> requirements for a Bible reader:
> - local storage
> - fast navigation UI (Laridian had specialized T9 for book names. You
> could get most anywhere in the Bible in about 6 keypresses.)
> - continuous scrolling (across chapter divisions)
> - cross references and footnotes
> - word/phrase search (perhaps fuzzy?)
> 
> optional features:
> - scripture memory helper (I have a lot of concrete ideas here)
> - finding related resources (e.g., sermons) from selected resources
> - daily reading (or at least "what's next after things I've read recently?")
> - screen orientation lock
> - song lyrics
> - history tracking ("what passages did I look up while studying
> yesterday?"), perhaps communally ("what books have my friends been
> reading?")
> 
> Any other interest in helping out? How can we organize a team?
> 
> Martin, if you're still listening, I'd love to check out your code too.
> 
> -Ken
> 
> 
> PS - here's the `adb logcat` from a failed module download. Turns out
> it succeeds if you create a 'modules' directory inside /sdcard/sword
> :) -- but then there are plenty of other issues.
> 
> 08-24 23:19:46.443  2002  2021 D libsword.so: remoteInstallModule:
> sourceName: CrossWire
> 08-24 23:19:46.443  2002  2021 D libsword.so: remoteInstallModule: modName: ESV
> 08-24 23:19:46.443  2002  2021 D libsword.so: ***** InstallMgr::installModule
> 08-24 23:19:46.443  2002  2021 D libsword.so: ***** modName: ESV
> 08-24 23:19:47.286  2002  2021 D libsword.so: ***** mgr.prefixPath:
> /sdcard/sword/InstallMgr/20081216195754/
> 08-24 23:19:47.286  2002  2021 D libsword.so: *****
> destMgr->prefixPath: /sdcard/sword/
> 08-24 23:19:47.286  2002  2021 D libsword.so: ***** absolutePath:
> /sdcard/sword/InstallMgr/20081216195754/modules/texts/ztext/esv/
> 08-24 23:19:47.286  2002  2021 D libsword.so: ***** relativePath:
> modules/texts/ztext/esv/
> 08-24 23:19:47.286  2002  2021 D libsword.so: netCopy:
> ftp.crosswire.org, modules/texts/ztext/esv/,
> /sdcard/sword/InstallMgr/20081216195754/modules/texts/ztext/esv/, t,
> 08-24 23:19:47.341  2002  2021 W System.err: Problem installing: -1
> 08-24 23:19:47.396  2002  2002 D libsword.so: getModInfoList returning
> 0 length array
> 
> 
> On Sun, Jun 13, 2010 at 4:30 AM, Martin Denham <mjdenham at gmail.com> wrote:
>>
>> Hi Troy,
>> Apologies, I was a bit confused regarding the different projects.  The above was my first post to *Sword forums.  I incorrectly thought that JSword, Sword and other Crosswire forums would be worked on by the same people.  I have now joined the JSword-dev list which I had not spotted before.
>> Whether the back end is built based on Sword or JSword it might be worthwhile combining with the Java Jsword guys for the front end which I think has to be in Java.
>> I may download your apk and try it out.  I can put my code/build somewhere if you want but it's still in a state of great flux.
>> Kind regards
>> Martin
>> On 13 June 2010 04:54, Troy A. Griffitts <scribe at crosswire.org> wrote:
>>>
>>> Martin,
>>>
>>> Great news on your success of getting JSword to build on Android.  I'm
>>> sure the JSword mailing list would be interested to hear about your success!
>>>
>>> I'm not sure about the speed.  I will add a primitive search box to my
>>> test app and let you know how long a complete search of the KJV (a
>>> heavily marked up Bible) takes on my G1.
>>>
>>> Troy.
>>>
>>>
>>>
>>>
>>> On 06/09/2010 05:28 AM, mjdenham wrote:
>>>> Hi Troy,
>>>>
>>>> I just thought I would mention that I have also been playing around with
>>>> Android.
>>>>
>>>> I have spent the last few weeks creating a prototype bible viewer
>>>> application for Android, but I just noticed Troy's messages in this forum.
>>>> I took a slightly different technical approach to you and I don't know which
>>>> is better and I also came at this project with the aim of creating a mobile
>>>> bible viewer I could tweak and improve rather than specifically to write an
>>>> Android front end for Sword.  By way of information I thought I would
>>>> outline my approach and what led me to start.
>>>>
>>>> I have used Pocket e-Sword for many years but development has now ceased on
>>>> Pocket e-Sword and it is already looking a bit old, as is WinMob that it
>>>> runs on, so I started thinking what to use in the future.  Although I loved
>>>> using Pocket e-sword there were one or two things that I would have loved to
>>>> change if I had access to the source but the source was closed.  Most pocket
>>>> bible apps seem to be closed source and many charge money or depend on being
>>>> on-line so I began to think about writing my own.  I have been writing Java
>>>> code for a living since the 90's.  I looked at Java ME which unfortunately
>>>> is not supported by recent, popular, trend-setting phones like iPhone and
>>>> Android and started going that route but there doesn't seem to be much
>>>> http://stackoverflow.com/questions/1414288/j2me-vs-android-vs-iphone-vs-symbian-vs-windows-ce
>>>> buzz around Java ME  at the moment.  I briefly thought of iPhone but refuse
>>>> to learn Objective-C, buy a Mac, and bend over backwards to get the app into
>>>> App Store.  Then I realised that Google have built Android primarily for
>>>> Java Applications and Gartner predict that by 2012 Android will outsell the
>>>> iPhone so I downloaded the Android SDK and am impresed by the application
>>>> framework Google have put into Android.  Incidentally I went to a
>>>> fascinating talk on Android by Reto Meier yesterday evening.
>>>>
>>>> As Android hosts Java apps so well it seemed a good idea to use java front
>>>> to back so I downloaded the  jSword and sword-Common projects back-end to
>>>> serve the OSIS documents and started creating a Java front-end for jsword on
>>>> Android so I have now been doing that for the last couple of weeks off and
>>>> on.  I included the jsword and common jars in my Android app and simplified
>>>> the xslt template I found in bible-desktop and now have a basic bible viewer
>>>> app.
>>>>
>>>> Troy, I am interested to see that you use jni to access a C back-end.  Is
>>>> that right?  Does this give better performance or is there another reason.
>>>>
>>>> In the front end I am currently using a TextView but briefly used a WebView
>>>> which has better html support. I may have to switch back to WebView.  I
>>>> tried to copy the PocketSword verse selection screen but failed so I am just
>>>> using 3 combos for now.
>>>>
>>>> I haven't used Crosswire code before and it took me a while to get used to
>>>> OSIS and jsword but the code looks great and I am now familiar enough with
>>>> jsword to find my way around the necessary parts.
>>>>
>>>> Here is a screen print of the current state:
>>>> http://sword-dev.350566.n4.nabble.com/file/n2248754/android-bible1.jpg
>>>>
>>>> For now I am still happily trying to improve on the prototype but I could
>>>> switch and contribute to a central project  with others.  My only aim is to
>>>> create a good open source bible I can tweak and that others may find useful
>>>> too.
>>>>
>>>> Best regards
>>>> Martin
>>>>
>>>
>>>
>>> _______________________________________________
>>> sword-devel mailing list: sword-devel at crosswire.org
>>> http://www.crosswire.org/mailman/listinfo/sword-devel
>>> Instructions to unsubscribe/change your settings at above page
>>
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
> 
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list