[jsword-devel] [JIRA] Commented: (JS-139) Add Android recognition to o.c.common.util.OSType

Martin Denham (JIRA) jira at crosswire.org
Mon Dec 6 08:22:34 MST 2010


    [ http://www.crosswire.org/bugs/browse/JS-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13655#action_13655 ] 

Martin Denham commented on JS-139:
----------------------------------

System.getProperty("os.name") returns 'Linux' so that isn't going to help us much.
System.getProperty("java.vendor") returns 'The Android Project' which might help us.
Would you like me to check any other values?

Manually loaded sword modules go in mnt/sdcard/jsword or /sdcard/jsword depending on the version of Android but downloaded modules go into an app specific dir ({mnt/}sdcard/Android/data/"+PACKAGE_NAME+"/files/") which is deleted automatically if the app is uninstalled.  Because the auto-deleted dir is app specific you can't really initialise it in JSword.

Currently And Bible initialises the dirs at startup.  I don't know how correct this is but it works:
   CWProject.setHome("jsword.home", moduleDir.getAbsolutePath(), SharedConstants.MANUAL_INSTALL_DIR.getAbsolutePath());
   SwordBookPath.setAugmentPath(new File[] {SharedConstants.MANUAL_INSTALL_DIR});
where moduleDir is the auto-deleted application specific dir and MANUAL_INSTALL_DIR is {/mnt}/sdcard/jsword

I must confess that I was not a (J)Sword user and may not have configured the directories exactly correctly so please say if it looks wrong.  Also the above looks a bit confusing to me so ask if it isn't clear.


> Add Android recognition to o.c.common.util.OSType
> -------------------------------------------------
>
>                 Key: JS-139
>                 URL: http://www.crosswire.org/bugs/browse/JS-139
>             Project: JSword
>          Issue Type: Improvement
>          Components: o.c.common.util
>    Affects Versions: 1.6
>         Environment: Android
>            Reporter: DM Smith
>            Assignee: Martin Denham
>            Priority: Minor
>             Fix For: 1.6.1
>
>
> It appears that we need to do special stuff for Android. It needs to be added to OSType.
> The questions are:
> what is the System Property os.type
> what is the proper location for sword modules and jsword preferences?
> Should these directories be hidden or not.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://www.crosswire.org/bugs/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jsword-devel mailing list