├── .classpath ├── .gitignore ├── .project ├── .settings ├── org.eclipse.jdt.core.prefs └── org.maven.ide.eclipse.prefs ├── AndroidManifest.xml ├── README ├── default.properties ├── pom.xml ├── res ├── drawable-hdpi │ └── icon.png ├── drawable-ldpi │ └── icon.png ├── drawable-mdpi │ └── icon.png ├── layout │ └── main.xml └── values │ └── strings.xml └── src └── com └── ecs └── android └── oauth ├── Constants.java ├── OAuthFlowApp.java ├── OAuthRequestTokenTask.java ├── PrepareRequestTokenActivity.java └── RetrieveAccessTokenTask.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | /target 3 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | AndroidOAuthFlowSample 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | org.maven.ide.eclipse.maven2Builder 25 | 26 | 27 | 28 | 29 | 30 | org.maven.ide.eclipse.maven2Nature 31 | com.android.ide.eclipse.adt.AndroidNature 32 | org.eclipse.jdt.core.javanature 33 | 34 | 35 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Tue Dec 14 17:42:58 CET 2010 2 | eclipse.preferences.version=1 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.compliance=1.6 5 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 6 | org.eclipse.jdt.core.compiler.source=1.6 7 | -------------------------------------------------------------------------------- /.settings/org.maven.ide.eclipse.prefs: -------------------------------------------------------------------------------- 1 | #Mon Dec 13 19:22:47 CET 2010 2 | activeProfiles= 3 | eclipse.preferences.version=1 4 | fullBuildGoals=process-test-resources 5 | resolveWorkspaceProjects=true 6 | resourceFilterGoals=process-resources resources\:testResources 7 | skipCompilerPlugin=true 8 | version=1 9 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | > 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Sample Android app that does the OAuth Dance. 2 | 3 | Accompanying article can be found here : 4 | 5 | http://blog.doityourselfandroid.com/2010/11/10/oauth-flow-in-android-app/ 6 | 7 | Goes through all the steps of the OAuth Flow 8 | 9 | * Get Request Token 10 | * Authorize Token 11 | * Get Access Token 12 | * Perform Google API call (retrieve contacts). 13 | -------------------------------------------------------------------------------- /default.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "build.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | # Project target. 11 | target=android-4 12 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.ecs 5 | AndroidOAuthFlowSample 6 | apk 7 | 0.0.1-SNAPSHOT 8 | AndroidOAuthFlowSample 9 | 10 | 11 | 12 | com.google.android 13 | android 14 | 1.6_r2 15 | provided 16 | 17 | 18 | oauth.signpost 19 | signpost-core 20 | 1.2.1.1 21 | 22 | 23 | oauth.signpost 24 | signpost-commonshttp4 25 | 1.2.1.1 26 | 27 | 28 | org.json 29 | json 30 | 20090211 31 | 32 | 33 | 34 | 35 | ${project.artifactId} 36 | src 37 | 38 | 39 | org.apache.maven.plugins 40 | maven-compiler-plugin 41 | 2.3.2 42 | 43 | 1.6 44 | 1.6 45 | 46 | 47 | 48 | com.jayway.maven.plugins.android.generation2 49 | maven-android-plugin 50 | 2.8.3 51 | 52 | 53 | 1.6 54 | 55 | true 56 | 57 | true 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ddewaele/AndroidOAuthFlowSample/ae3ec71e8e7365644409ce93b5cf6f045a54a202/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ddewaele/AndroidOAuthFlowSample/ae3ec71e8e7365644409ce93b5cf6f045a54a202/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ddewaele/AndroidOAuthFlowSample/ae3ec71e8e7365644409ce93b5cf6f045a54a202/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 |