-
Notifications
You must be signed in to change notification settings - Fork 405
Set up your Todo.txt for Android development environment with Eclipse
Interested in learning Android development? Todo.txt for Android is a simple, fun app to hack on, and all the source code is available right here on GitHub, with a community of developers and users available to answer questions via email and on IRC. Once you've worked your way through the Hello World Android tutorial, try grabbing the Todo.txt code and running it in the Android emulator.
It is important that you follow these steps exactly and perform the clone as a separate step outside of Eclipse and then create the project as described below. To clone the project directly from within Eclipse may cause problems that cannot be easily resolved.
- install Eclipse and the Android SDK if you have not already done so.
- fork and clone the todo.txt-android repository.
- Create a new Android project in Eclipse:
-
File->New Project->Android->Android Project from Existing Code
. - Tick
Create project from existing source
and set the location to the folder where you saved the source code.
- Create a Dropbox Api Key and add it to the project. See next sections.
Initially, the todo.txt-android project will not compile. Do the following to correct any errors and get ready to develop:
- Log into the Dropbox Developers Section.
- Click the "Create App" button.
- Select
- "Dropbox API App" ->
- "Files and datastores" ->
- "No - My app needs access to files already on Dropbox" ->
- "Specific file types - My app only needs access to certain file types, like text or photos" ->
- "Text files TXT, Markdown, Code files, HTML, etc."`.
- Enter a name like "My Awesome Todo.txt fork"
- Click the "Create App" button.
You should now see your own personal App key and App secret displayed on the ensuing page. You'll need these for the next step.
- Copy
\res\values\sample-dropbox.xml
file to\res\values\dropbox.xml
. - Edit
\res\values\dropbox.xml
.
- Replace
Enter your Dropbox app key here
with db- followed by your Dropbox App key. - Replace
Enter your Dropbox app secret here
with your Dropbox App secret. - Uncomment out those lines.
It is very important that your App key is prepended with db- in the dropbox.xml
file. Otherwise, the app will crash when you attempt to Log in.
Always use Control+Shift+F to format your files. To prevent Eclipse from re-formatting XML file license header blocks, uncheck the "Join Lines" feature under Preferences->XML->XML Files->Editor.