User:Cognifloyd/LDSTools for Android Architecture

Why am I doing this? I'm Assistant Stake Clerk / Stake Website Administrator in a YSA Stake. I've got to train the leaders in the stake on how to use all of these great tools - but they don't work right. And, as YSA units seem to be low on the priority list for the LDSTools for Android devs, I'm trying to figure out how I can help resolve issues for YSA stakes/wards like mine. Don't get me wrong - handling Households and Pictures are much more universally helpful features. I don't want to discourage anyone from working on them. I would like to encourage work on issues that help me, and those I serve, fulfill our callings. :D

SVN Folders

The latest: 1.1.0 - trunk

Helpful Stuff: Coding Standards (use Checkstyle, FindBugs[1], and PMD[2])



External libraries reside in /libs/, but are defined in pom.xml. In trunk (no /libs/ in 1.1.0), LDS Tools for Android is using the following (added in Rev 1872 & Rev 1912. Verified accurate as of Rev 1950.):

In pom.xml? Library Name Purpose File in trunk Version in trunk
yes RoboGuice Google Guice on Android - "smoothes out some of the wrinkles in your Android development experience and makes things simple and fun."

This depends on Google Guice and compatibility (see below)




2.0.20111219 (old) 2.0.20120209

Google Guice Provides CDI (Contextual Dependency Injection)

Guice 3.0 without AOP, suitable for Android - Needed by RoboGuice (above)

guice-3.0-no_aop.jar 3.0-no_aop
yes Compatibility Library V4 Provides newer Android API for older devices that don't have the necessary API calls. Needed by RoboGuice (above) compatibility-v4-r6.jar r6
@inject I'm not sure why this one is in here. Perhaps because Guice doesn't have the aop parts. javax.inject-1.jar 1
aopalliance I'm not sure why this one's here... Perhaps because Guice doesn't have the aop parts. aopalliance-1.0.jar 1.0
yes SQLCipher Open Source Full Database Encryption for SQLite. sqlcipher-1.1.jar

ameabi/lib*.so (native code libs)

yes Apache Commons Codec Required by SQLCipher for decode/encode of db commons-codec-1.6.jar 1.6
yes Google Guava Libraries Required by SQLCipher. "The Guava project contains several of Google's core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth." guava-11.0.1.jar 11.0.1
yes FlurryAgent Analytics Analytics Agent Utility used to send analytics to a server from the mobile device.

Currently integrated with Flurry handles all of the threading to keep this work off of the UI Thread.

FlurryAgent-2.2.4.jar 2.2.4
yes Mockito A mocking framework to make testing easier test/mockito-core-1.9.0.jar 1.9.0


General presentation resources including: colors, strings, gui stuff, templates. Also has xml files for integrating with Android services.

  • /value/ contains strings in English, as well as some style and color stuff to be used across the app
  • value-* contains translation strings (da-rDK, pt, pt-rBR)
  • /color/ has a file about colors in the tabs - not sure why it's not in values.
  • /drawable-*dpi/ contains gui elements for specific resolutions: high mid low
  • /layout/ contains the overall visual templates for the app in an xml format
  • /menu/ contains the xml templates for the menu pages in the app
  • /xml/ files that help integrate LDS Tools data with Android (eg Shared Preferences, Accounts, Sync Adapter and Contacts)

main source

/test/ is exactly what it sounds like: contains test stuff.

/main/ contains the meat of the app.

  • /scripts/ has a python script to find untranslated strings
  • /database/ is the domain definition. This is used to generate everything in /java/org/lds/ldstools/domain/. (How do you regenerate?)
  • /java/org/lds/ldstools/ This is the heart and soul of LDS Tools
    • Main java files
    • Model
      • /domain/ is generated by /main/database/ (see above).
    • View (ish)
      • /widgets/
        • NewTabAPI to help in creating the tabs at the bottom of the screen ("The widget package contains (mostly visual) UI elements to use on your Application screen." [7])
        • EncryptedEditTextPreference which deals with the encrypted passwords.
        • ResetDataPreference which provides the widget to reset data
      • /menu/ Builds the menus ("Interface for managing the items in a menu."[8])
      • /activity/ Builds the various screens in the app ("An activity is a single, focused thing that the user can do"[9])
      • /adapter/ Loads data into lists of Households, Individuals, Callings, or Units ("the ListAdapter binds the ListView to the data"[10])
    • Controller (ish)
      • /api/ This is the web services for retrieving info about members, callings, etc.
        • WebService gets the uris for web service calls
        • NetworkUtilities Retrieves the JSON objects from the web services
        • Parser parses the JSON into useful objects for use in the rest of the app
        • Handle Errors and Excpetions when dealing with the web services via the appropriate class
      • /sync/ Uses the api (above) to sync member and calling info to the database
      • /task/ Has some tasks that help in downloading Individual/Household images (also via api), and updating the cache when they're done downloading.
      • /service/ Contains the CallerIDService which searches the LDSTools contacts when someone calls and displays a little popup to say who's calling.
      • /listener/ Event handlers that run the CallerIDService on incoming calls according to the user's preferences
    • Etc
      • /util/ Misc utils that didn't fit elsewhere
        • AUU is the Analytics Agent Utility. This uses the Flurry Agent to send Analytics data to to see how most people use LDSTools
        • EncryptUtil deals with encrypting the stored LDSAccount Password
        • ImageUtil deals with saving images locally on the device
        • SdCardUtil deals with getting locations to stored data. We prefer to store data on the SD Card otherwise, use /data/data/ directory
        • ServiceUtil provides isServiceRunning()
        • SubmitBugReport deals with sending bug reports to the devs


  • Is there a standard way to run PMD & FindBugs?
  • Why is javax.inject in there with guice?
  • Is aopalliance a dep of something?
  • How do you regenerate the domain files after doing something to the xml domain def in /database/?
  • Is there a plan to move from /res/ to /src/main/resources/?

Issue: Out-of-unit leaders

The big issue facing me right now, is out-of-unit members in leadership positions.

  1. Out-of-unit leaders should show up in Leader lists (eg Bishopric in a YSA ward)
  2. Out-of-unit leaders should be able to see the stake/ward over which they have stewardship (eg Stake Presidency + Clerks in a YSA stake)

It looks like the issue might be in one or more of these places:

  1. Can the domain handle out-of-unit leaders?
  2. Is sync getting the out-of-unit leaders? Is it dropping them?
    • /api/
      • It looks like rev 1780 changed to the UNIT_MEMBER_AND_CALLINGS - this should be the key.
    • /sync/
  3. Is the adapter not including them in a the list?
  4. Are any of the other views killing the data?
This page was last modified on 20 February 2012, at 13:59.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.