joindin/Joind.in-android-app — pull request #1 by richsage (2013-08-10 17:33:19+00:00)
Title: OAuth2 authentication work so far

This PR is still WIP* (see tasks below), but it does allow a user to successfully authenticate against the joind.in website via OAuth. This code also relies on a [website PR](https://github.com/joindin/joind.in/pull/756) being merged to identify failed authentication (so that the app can capture that and inform the user accordingly).

The new code uses the built-in Android account management system to store credentials.

To get this code working, there is an example file in `source/res/raw/oauth.dist` that should be copied to `source/res/values/oauth.xml`. Create an API key on the joind.in site, and use `joindin://oauth-response/` as the callback URL. Edit your `oauth.xml` file and pop your API key into here, then build the app. This should allow authentication and redirection back to the app.

Things left to do on this PR:
- [ ] Tidy up code - there's some IDE auto-comments and similar
- [ ] Remove any redundant strings in `strings.xml` that were from the previous username/password preferences
- [ ] Adjust the 'denied' capture code based on the website PR mentioned earlier, if any changes are required
- [ ] Document the `oauth.xml` file usage somewhere, so it's more obvious what is required to do for build.

*also I'm now away for a couple of weeks, so this PR is also so others can try it and test it out!