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).
- Copy the URI to the Git repository (ex:
git://github.com/matburt/mobileorg-android.git). - In Eclipse, click on File – Import – Projects from Git – URI. This may autodetect the URI. If not, paste in the URI. Click Next.
- You should now see a list of branches. You can leave them all selected. Click Next.
- Check the box for Clone Submodules. This will make sure that the project’s dependencies are also checked out. Click Next.
- 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.
- Close Eclipse.
- Move the
mobileorg-androidsubdirectory from your Eclipse workspace directory to a different directory that is not in your workspace. - Start Eclipse again.
- Click on File – Import – Existing Android Code Into Workspace. Click Browse and choose the
mobileorg-androidfolder. - Click on Deselect All.Reselect the following:
- com.matburt.mobileorg.Gui.OutlineActivity
- library
- com.twofortyfouram.locale.MarketActivity
- Click on Finish.
Now you should have a bunch of projects in your system. You may need to adjust the libraries and build paths.
- Right-click on the
com.matburt.mobileorg.Gui.OutlineActivityproject and choose Properties. - Click on Android and confirm that both libraries are detected. If not, you may need to remove and re-add them.
- Wait for the libraries to be built. If you notice that the compiled JARs don’t have classes, doublecheck that the
srcfolder has loaded the sources. Right-click on thesrcfolder and choose Refresh in order to get the sources recognized by Eclipse.
Re-detect the Git connection by doing the following:
- Right-click on the
com.matburt.mobileorg.Gui.OutlineActivityproject and choose Team – Share Project. - Choose Git.
- Check the Use or create repository in parent folder of project.
- Check the .git directory you’re using.
- 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"
Hope that helps!
Short URL: http://sachachua.com/blog/p/23631-
Priya D
-
http://www.bennee.com/~alex Alex
-
https://github.com/matburt Matthew Jones
-
Benton
I'm 