6092 comments
2357 subscribers
6240 on Twitter
Subscribe! Feed reader E-mail

Building MobileOrg for Android

If you want to use your Android device to work with your Org-mode files, there’s MobileOrg and there’s MobileOrg NG. MobileOrg seems to have more recent activity and more contributors, but NG has a more tablet-optimized layout and better support for navigating large files, so it would be good to apply some of the ideas from NG to the main MobileOrg project. Might be a useful way for me to learn more about mobile development.

Here’s how to build MobileOrg (the matburt version).

  1. Copy the URI to the Git repository (ex: git://github.com/matburt/mobileorg-android.git).
  2. In Eclipse, click on File – Import – Projects from Git – URI. This may autodetect the URI. If not, paste in the URI. Click Next.
  3. You should now see a list of branches. You can leave them all selected. Click Next.
  4. Check the box for Clone Submodules. This will make sure that the project’s dependencies are also checked out. Click Next.
  5. When you see the dialog called Select a wizard to use for importing projects, click on Cancel.

Because the .project file hasn’t been set up, you’ll need to import the project using a different wizard. However, there’s an Eclipse bug that can make this a bit of a hassle, so this is what you should do to get the projects set up in your system.

  1. Close Eclipse.
  2. Move the mobileorg-android subdirectory from your Eclipse workspace directory to a different directory that is not in your workspace.
  3. Start Eclipse again.
  4. Click on File – Import – Existing Android Code Into Workspace. Click Browse and choose the mobileorg-android folder.
  5. Click on Deselect All.Reselect the following:
    • com.matburt.mobileorg.Gui.OutlineActivity
    • library
    • com.twofortyfouram.locale.MarketActivity
  6. Click on Finish.

Now you should have a bunch of projects in your system. You may need to adjust the libraries and build paths.

  1. Right-click on the com.matburt.mobileorg.Gui.OutlineActivity project and choose Properties.
  2. Click on Android and confirm that both libraries are detected. If not, you may need to remove and re-add them.
  3. Wait for the libraries to be built. If you notice that the compiled JARs don’t have classes, doublecheck that the src folder has loaded the sources. Right-click on the src folder and choose Refresh in order to get the sources recognized by Eclipse.

Re-detect the Git connection by doing the following:

  1. Right-click on the com.matburt.mobileorg.Gui.OutlineActivity project and choose Team – Share Project.
  2. Choose Git.
  3. Check the Use or create repository in parent folder of project.
  4. Check the .git directory you’re using.
  5. Click on Finish.

I also had to remove some code from AndroidManifest.xml because you’re apparently not supposed to have more than one action in an intent-filter:

diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 01c4f1e..9fc3eb1 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -64,14 +64,11 @@
             android:name=".Gui.OutlineActivity"
             android:label="MobileOrg"
             android:theme="@style/Theme.MobileOrgActionbar" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
-
                 <category android:name="android.intent.category.LAUNCHER" />
-
-                <action android:name="com.matburt.mobileorg.Synchronizer.action.SYNC_UPDATE" />
             </intent-filter>
         </activity>
         <activity
             android:name=".Gui.NodeViewActivity"
             android:label="Org View"

(StackOverflow)

Hope that helps!

Short URL: http://sachachua.com/blog/p/23631
  • Priya D

    This is really awesome..and quite an useful discovery for me…Thank you Sacha…..

  • http://www.bennee.com/~alex Alex

    have you had any joy building its under Emacs?

  • http://sachachua.com Sacha Chua

    Alex: Haven’t tried that yet. =) As an Android newbie, I’m probably going to stick with the training wheels of the recommended IDE for a little while, or at least until I miss Emacs too much. I assume MobileOrg’s normally developed in Emacs, though, so you could ask the mailing list for tips.

  • https://github.com/matburt Matthew Jones

    Thanks for this info Sacha.

    There’s a lot of work going on in MobileOrg land right now! We’d definitely like some help in closing out some bugs and adding new features. I do really like MobileOrgNG’s tablet UI and that’s something we’d love to have included in our project… it’s just a matter of finding the time to add it in.

    Since I use emacs for all of my development I’m sorry to say that supporting Eclipse users has fallen a little by the wayside. Recently we’ve been trying to make it easier for Eclipse users to contribute by providing some scripts and info in the wiki and source tree itself. It’s important to note that any contributions should still work from the emacs/cli building approach in order to be included in the mainline source tree.

    • http://sachachua.com Sacha Chua

      Thanks for working on it! =) I’ve sent a pull request that also includes some Eclipse-related housekeeping (mainly the .project file), so if those make it into the main branch, then these instructions will be out of date and I’ll happily revise them. =)

  • Benton

    I recently picked up my first ‘smart’ phone, a Galaxy S-II, with intent to see what I could learn about programming Android apps. First app I added was MobileOrg.

    Interesting hearing Matt’s comments that the current dev work is mostly done in Emacs; I had figured the first step would be getting Eclipse installed but maybe not.

    Benton 7aug12

On This Day...

  • 2011: Drupal, HTML Purifier, and embedding IFRAMES from YouTube — I know, I know. I shouldn’t allow IFRAMEs at all. But the client’s prospective users were really excited about images [...]
  • 2010: Long weekend reflections — Long weekends? We don’t pack our bags and travel, or kick our feet up and chill out at our (non-existent) [...]
  • 2009: In-jokes and shared experiences — W- helped me put together some wire shelves for plants. One of the rods was deformed, so he brought out [...]
  • 2009: Weekly review: Week ending August 2, 2009 — From last week’s plans: Do some Facebook strategy consulting Find ways to recognize the contributions people had made to the idea lab [...]
  • 2008: Drupal shell: quickly evaluating PHP statements in a Drupal context — I often find myself needing to variable_set something temporarily, just to try things out. The drush module provides a command-line [...]
  • 2007: Weekly review — This week Send thesis draft to people, really. Done. Check paperwork requirements for post-graduate work permit and start compiling them. Started Revise CASCON paper. Done. Do one [...]
  • 2007: Moving back to PCFinancial — I think I’ll move back to PCFinancial for my banking. I don’t think I’ll need any financial statements for my future [...]
  • 2005: Changing patterns of computing — I managed to leave my laptop at home today! =) That forced me to be productive all day. See how many [...]
  • 2005: On mailing lists — I find it a bit strange that people here like broadcasting their messages by putting everyone in To: or Cc:. I [...]
  • 2004: Philippine comic book blog — http://filipinocomics.blogspot.com E-Mail from Julius Oliveros
  • 2003: Emacs macros — Keyboard macros in Emacs allow me to easily generate the gallery from the pipe-separated values I exported from Gnumeric. Viva open [...]
  • 2003: RSS feed — I think it should be relatively easy to publish an RSS feed of the links from my planner wiki…
  • 2003: Plans — I’m going to try to move my plans up by a year. I suspect I’ll learn more by going to graduate [...]
  • 2003: Experts — I think I’ve a way to deal with my large CS123 class: topic experts. Each group has experts in charge of [...]
  • 2003: Teaching — Holding up. Doing remarkably well, in fact – probably because I’m too busy to do anything else. The sheer magnitude of [...]
  • 2003: Communication — Considering that I tend to text long messages in bursts, it might actually make more sense for me to stay at [...]
  • 2003: Redesign — Using objects in the beginning - graphics right away; bounds and draw promotes object reuse - using objects - implementing methods - expressions - if - loops - [...]
  • 2003: http://www.geocities.com/fanny11sy/featured-projects
  • 2003: JPCS conference — end of august, one way of reviving contact with JPCS. Need a venue for a seminar for the gathering of all [...]
  • 2003: Java patterns — http://www.anupriyo.com/oopfm.shtml

Get the highlights as a PDF!

Stories from my Twenties: Highlights from a Decade of Blogging

Free sample!