How to build MobileOrgNG for Android
| android, emacs, geekMobileOrgNG is kvj’s fork of matburt’s MobileOrg for Android. It has a better layout for large devices and a useful outline view, but doesn’t have some of the other features in the main branch. Here’s how you can build it in Eclipse.
In order to be able to get all the libraries you’ll need, install the Subversive SVN plugin for Eclipse.
- In Eclipse, click Help – Install New Software.
- Click on the dropdown for Work with and choose the update site for your Eclipse version (ex: Juno).
- When the packages load, type in Subversive to filter the list.
- Choose Subversive SVN Team Provider. You can choose other plugins as well.
- Click Next and proceed through the installation process.
Now you can check out the MobileOrgNG source code and other modules. MobileOrgNG is set up as an Eclipse project, so importing it is easier than importing the original MobileOrg. Here’s how to get MobileOrgNG:
- Copy the Git repository URI (ex: git://github.com/kvj/mobileorg-android.git)
- In Eclipse, click File – Import – Git – Projects from Git.
- Choose URI.
- The URI may automatically be detected from the clipboard. If it isn’t, paste it in.
- Click Next.
- Click Next again.
- Click Next.
- You should now be at the dialog called Select a wizard to use for importing projects. Choose Import existing projects and click Next.
- It should have detected the mobile-org project. Click Finish.
In addition to MobileOrgNG, you will also need the android-actionbar
and android-file-dialog
libraries. Here’s how to get android-actionbar
:
- Go to https://github.com/kvj/android-actionbar and copy the Git repository URL (ex: git://github.com/kvj/android-actionbar.git).
- In Eclipse, click File – Import – Git – Projects from Git.
- Choose URI.
- The URI may automatically be detected from the clipboard. If it isn’t, paste it in.
- Click Next.
- Click Next again.
- In the Local destination dialog, change Initial branch to honeycomb-support. Click Next.
- You should now be at the dialog called Select a wizard to use for importing projects. Click Cancel.
- Click File – Import – Android – Existing Android Code Into Workspace.
- Click Browse and choose the
android-actionbar
directory in your workspace. You can deselect the actionbar example if you wish. - Click Finish.
Here’s how to get android-file-dialog
.
- Go to http://code.google.com/p/android-file-dialog/source/checkout and copy the SVN URI (ex: http://android-file-dialog.googlecode.com/svn/trunk/).
- In Eclipse, click on File – Import – SVN – Project from SVN.
- Paste in the URI.
- Click Next.
- Eclipse should prompt you to normalize the URL. Click Yes.
- Click Browse. Choose trunk and click OK.
- Click Finish.
- Choose Find projects in the children of the selected resource. Click Finish.
- Make sure that Check out as a projects into workspace is selected. Click Finish.
Confirm that the libraries are detected.
- Right-click on the
mobileorg-android
project and choose Properties. - Click Android and confirm that both libraries are detected. If not, you may need to remove and re-add them.
The Dropbox API key isn’t part of the source code, so you’ll need to apply for your own at https://www.dropbox.com/developers/start . After you get the API key, add it to your project:
- Create a new Android XML Values file. I called mine
secrets.xml
. - Right-click on the file and choose Team – Ignore.
- Add a string with the key
dropbox_consumer_key
and the value from the Dropbox webpage. - Add another string with the key
dropbox_consumer_secret
and the value from the Dropbox webpage.
MobileOrgNG should now compile without errors.