Common Folder for Modules

253 views
Skip to first unread message

Kostya Maslyuk

unread,
Feb 26, 2014, 10:38:08 AM2/26/14
to and-...@googlegroups.com
Hello.

Is it possible to define common folder to store Sword modules on android device? As i understand, AndBible store modules in data folder on external storage (/mnt/sdcard/Android/net.bible.android.activity/files). BibleTime Mini another Sword frontend for android use $EXTERNAL_STORAGE/.sword folder to store modules.

I hope that it is possible to define common modules folder for both frontends and provide better experience for the end users.

Blessings.

Martin Denham

unread,
Feb 26, 2014, 1:01:10 PM2/26/14
to and-...@googlegroups.com
Hi Kostya,

/mnt/sdcard/Android/net.bible.android.activity/files is the directory allocated to And Bible by Android automatically.  If I were to use .sword then it would not be automatically removed if a user uninstalls And Bible.  There are quite a few apps that install data in various folders that remain after the app is removed but with so many apps being installed/uninstalled it leaves a lot of redundant folders and data.

I did think of automatically removing data from a root folder on uninstall of AB but Android does not have an uninstall callback - apps aren't told when they are about to be uninstalled, so this is not possible.

On the other hand some users might like to retain downloaded modules if And Bible is reinstalled but in general if an app is uninstalled it should not leave data on the SD card.

Martin


--
You received this message because you are subscribed to the Google Groups "And Bible" group.
To unsubscribe from this group and stop receiving emails from it, send an email to and-bible+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

jonathon

unread,
Feb 26, 2014, 10:15:23 PM2/26/14
to and-...@googlegroups.com
On 2/26/2014 7:38 AM, Kostya Maslyuk wrote:

>I hope that it is possible to define common modules folder for both frontends and provide better experience for the end users.


I like that idea.

The _big_ problem with that idea, is that Bible Time Mini can utilize
resources that AndBible can't, and AndBible can utilize resources that
Bible Time Mini can't.



jonathon

Peter Von Kaehne

unread,
Feb 26, 2014, 1:09:40 PM2/26/14
to and-...@googlegroups.com
I think Martin's point is valid, but now with increasing numbers of Sword/Jsword frontends on android - I have three different, not counting the clones on my phone (And Bible, Bibletime Mini and CrossConnect GPL) - it would make sense to have a shared common folder, which could be chosen and set as a non-default setting, maybe with a suitable warning that it will remain on SD card once the app is uninstalled.

Peter
 
 
Gesendet: Mittwoch, 26. Februar 2014 um 18:01 Uhr
Von: "Martin Denham" <mjde...@gmail.com>
An: and-...@googlegroups.com
Betreff: Re: [And Bible] Common Folder for Modules

Ildar Mulyukov

unread,
Feb 28, 2014, 10:57:50 AM2/28/14
to and-...@googlegroups.com

I believe a sword app (e.g. And Bible) is easy to learn to look in different locations. It may worth to submit a bug in tracking system.

26.02.2014 21:38 пользователь "Kostya Maslyuk" <kostya...@gmail.com> написал:
--

Troy A. Griffitts

unread,
Mar 25, 2014, 3:39:02 PM3/25/14
to and-...@googlegroups.com
Yes.  I agree with all the comments here.

I understand Martin's desire to uninstall all data associated with an app.  That's just plain decent.  If multiple SWORD applications are sharing the same module set then it would be impractical to determine if modules should be uninstalled, e.g., "Am I the last SWORD app being uninstalled? If so, remove the modules."  And Martin has already pointed out that Android does not provide an uninstall hook anyway.

So, we must weigh the benefit of possibly not being 'decent' in the event that all SWORD apps are removed.

I also would like to share SWORD modules between Android applications.  I am working on a very specialized study tool using the bishop bindings to SWORD and would love form my Activity to be an option for other SWORD applications.  It would be great if modules installed in AndBible were available when they run this new tool, and the other way 'round.

So, here is where we are now:

AndBible: /mnt/sdcard/Android/net.bible.android.activity/files
BTMini: /sdcard/.sword
Bishop bindings: /sdcard/sword
crossconnect: ?

If we agree on a common folder, we should decide if it should be visible or hidden.  If we might leave data behind, I think it should be visible so the user can delete if they desire.

As Ildar has commented, SWORD can look in multiple locations.

As a way forward, we could:

1) agree on a common location
2) be sure our applications start discovering modules in that common location
3) if applications still would like to have the option to retain a private module repository, they could ask the user on first install: "Would you like your Bibles to be available to all SWORD Project applications?"

What do others think about this?

Troy

Martin Denham

unread,
Mar 26, 2014, 4:43:47 PM3/26/14
to and-...@googlegroups.com
I have had various requests to enable specification of the storage location because with some devices the default external storage location is internal and smaller than secondary external SD Card storage.

So it would be good to generalise this and to allow a user to pick any storage location.

Martin


For more options, visit https://groups.google.com/d/optout.

Ildar Mulyukov

unread,
Mar 27, 2014, 5:07:49 AM3/27/14
to and-...@googlegroups.com
On Wed, Mar 26, 2014 at 1:39 AM, Troy A. Griffitts <scri...@gmail.com> wrote:
So, here is where we are now:

AndBible: /mnt/sdcard/Android/net.bible.android.activity/files
Not exactly. It is $SDCARD/Android/net.bible.android.activity/files +
$SDCARD/jSword/ , see http://code.google.com/p/and-bible/wiki/FAQ#Can_I_manually_add_modules/documents_to_And_Bible?

--
Ildar Mulyukov,
child of God

email: ildar.m...@gmail.com
GoogleTalk: ildar.m...@gmail.com
blog: http://johan-notes.blogspot.com/

Kostya Maslyuk

unread,
Apr 10, 2014, 4:13:02 PM4/10/14
to and-...@googlegroups.com
I had just noticed that i'm not subscribed to this thread on Google Groups.

1) agree on common storage location.

That is what i would like to do. If Sword will define discovery mechanism internally, i will be happy to get rid of own mechanism.

Historically first external storage root folder was perceived by apps on Android as user's home folder on Linux. I would be against of hardcored path /sdcard/ as i do not know if it actually points to SD card on all devices, i actually had issueas with it at least on emulator. I would recommend to discover correct path with environment variable $EXTRNAL_STORAGE. It would be also convinient to iterate through that variable to determine most suitable location, like $EXTRNAL_STORAGE[0], $EXTRNAL_STORAGE[1], $EXTRNAL_STORAGE[2], ...

So in my opinion correct mechanism to find correct location would be:
Iterate through $EXTRNAL_STORAGE values for .sword folder
If one was found - select first found
If no one was found - select first $EXTRNAL_STORAGE value, it would be /mnt/sdcard/
If variable is empty - application home will be selected

This will allow for advanced user to select which storage to use, if he will move .sword folder among storages.


I recomed to use hidden folder (.sword instead of sword) as regular user is not supposed to do anything with it. Hidden folder would be deleted as well, but dot in the beggining of folder name allow user to hide specifical content if he desire.

Martin Denham

unread,
May 21, 2014, 4:25:52 PM5/21/14
to and-...@googlegroups.com
This may have just become more difficult: Since kitkat apps "can only write to files and folders that they have created or have taken ownership of.".

Martin


--
You received this message because you are subscribed to the Google Groups "And Bible" group.
To unsubscribe from this group and stop receiving emails from it, send an email to and-bible+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Martin Denham

unread,
May 21, 2014, 4:27:23 PM5/21/14
to and-...@googlegroups.com
... "and if you uninstall [the app], the folder goes, too"

Troy A. Griffitts

unread,
May 21, 2014, 4:45:46 PM5/21/14
to and-...@googlegroups.com

Hi Martin,
Yes, I read about this recently and it has drawn much backlash from the developer community. Reading the threads, the Google engineers seemed to begin by defending the decision and then slowly backed down after numerous valid use cases were presented for multiple apps operating with write access to the same files (camera+photo album+image editor, music sync+music organizer+music player, etc.) I suspect this will be reversed. In the JavaScript bindings I'm finishing up to the C++ engine, I still use /sdcard/sword/ right now, but also include any modules discovered under your install path. I'd like to add discovery for Bible time mini but we still haven't finished our fight about sword/ or .sword/ being better. :) You can view a JavaScript tester app using the bindings to the C++ engine to see how it interoperates with And Bible modules here: http://crosswire.org/~scribe/bishop3.apk 

It's not nearly a full featured app, but it does fit in a 680k apk, which is nice. I'm getting more confident with the completion of the bindings. Still have a few async issues to work out, but should push them soon.

Thanks for your work on And Bible. You have a strong user base and are a blessing to so many people. I hope our projects can complement each other.

Troy

You received this message because you are subscribed to a topic in the Google Groups "And Bible" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/and-bible/5_fWvx_gQKA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to and-bible+...@googlegroups.com.

Martin Denham

unread,
May 21, 2014, 5:13:04 PM5/21/14
to and-...@googlegroups.com
I quite like the new restriction because it means my sd card will no longer be littered with unused folders in the root.  In particular most Bible apps install their documents into a root folder - And Bible is one of the few that has always tidied up after itself on uninstall.

Martin

Kostya Maslyuk

unread,
May 26, 2014, 6:53:00 AM5/26/14
to and-...@googlegroups.com
> ...we still haven't finished our fight about sword/ or .sword/ being better...


> I recomed to use hidden folder (.sword instead of sword) as regular user is not supposed to do anything with it. Hidden folder would be deleted as well, but dot in the beggining of folder name allow user to hide specifical content if he desire.

it does not make sense? SD card often have too much garbage in it from different apps, and i have never looked what is in 50% of those folders, so using ".sword" is only way to make difference of what was created by apps and what user supposed to modify freely. And it is only way to present it more tidy for casual users.

Kostya Maslyuk

unread,
May 26, 2014, 7:11:53 AM5/26/14
to and-...@googlegroups.com
I would like it too, but only with some kind of implementation of common folders. I trust to Bishop and AndBible, and i would be more happy if we can use same folder to store modules, that will be automatically removed when all of our apps was removed from device.


четверг, 22 мая 2014 г., 1:13:04 UTC+4 пользователь Martin написал:

Ildar Mulyukov

unread,
May 26, 2014, 12:39:32 PM5/26/14
to and-...@googlegroups.com


26 мая 2014 г. 16:53 пользователь "Kostya Maslyuk" <kostya...@gmail.com> написал:
> [...] so using ".sword" is only way
It is not. I'd prefer apps making folders under $Sdcard/Android/games, $Sdcard/Android/Bible, $Sdcard/Android/whatever. The Android folder is there anyway so why not use it? And avoid poisoning the $Sdcard folder with both unhidden and hidden folders.

Kostya Maslyuk

unread,
May 28, 2014, 4:21:58 AM5/28/14
to and-...@googlegroups.com
Thats a point to store modules in defined folder in sdcard root (although it can not solve all cases), but $EXTERNAL_STORAGE/Android is not candidate for that because it is system folder. It it used for android use cases and would be changed in future versions of android.


I actually have two questions:

Where is $HOME on android? not an application $HOME but users's. I still can't get why we should have special logic for android... As for me $EXTERNAL_STORAGE/. is the only candidate for user's $HOME.

How it is solved the deletion of .sword folder on Linux hosts?



понедельник, 26 мая 2014 г., 20:39:32 UTC+4 пользователь Ildar Mulyukov написал:
Reply all
Reply to author
Forward
0 new messages