├── .classpath ├── .gitignore ├── .project ├── AndroidManifest.xml ├── README.markdown ├── RESTful Android.iml ├── assets └── LICENSE.txt ├── docs ├── android-developing-RESTful-android-apps.pdf ├── generate-javadoc.sh ├── javadoc-howto.txt └── option-a.tiff ├── lib └── scribe-1.2.3.jar ├── proguard.cfg ├── project.properties ├── res ├── drawable-hdpi │ ├── ic_launcher.png │ └── refresh.png ├── drawable-ldpi │ └── ic_launcher.png ├── drawable-mdpi │ └── ic_launcher.png ├── drawable │ ├── button_login.xml │ ├── button_login_normal.xml │ ├── button_login_selected.xml │ └── progress.xml ├── layout │ ├── about.xml │ ├── action_bar.xml │ ├── home.xml │ └── login.xml ├── menu │ └── menu.xml └── values │ ├── colors.xml │ ├── strings.xml │ └── styles.xml ├── src └── com │ └── jeremyhaberman │ └── restfulandroid │ ├── RestfulAndroid.java │ ├── activity │ ├── AboutActivity.java │ ├── LoginActivity.java │ ├── TimelineActivity.java │ └── base │ │ ├── RESTfulActivity.java │ │ └── RESTfulListActivity.java │ ├── provider │ ├── ProfileConstants.java │ ├── ProfileData.java │ └── ProfileProvider.java │ ├── rest │ ├── AbstractRestMethod.java │ ├── GetProfileRestMethod.java │ ├── GetTimelineRestMethod.java │ ├── Request.java │ ├── Response.java │ ├── RestClient.java │ ├── RestMethod.java │ ├── RestMethodFactory.java │ ├── RestMethodResult.java │ └── resource │ │ ├── Profile.java │ │ ├── Resource.java │ │ ├── Tweet.java │ │ └── TwitterTimeline.java │ ├── security │ ├── AuthorizationManager.java │ └── RequestSigner.java │ ├── service │ ├── ProfileProcessor.java │ ├── ProfileProcessorCallback.java │ ├── RequestOutcome.java │ ├── RequestState.java │ ├── TimelineProcessor.java │ ├── TimelineProcessorCallback.java │ ├── TwitterService.java │ └── TwitterServiceHelper.java │ └── util │ └── Logger.java └── test ├── .classpath ├── .project ├── AndroidManifest.xml ├── proguard.cfg ├── project.properties ├── res ├── drawable-hdpi │ └── ic_launcher.png ├── drawable-ldpi │ └── ic_launcher.png ├── drawable-mdpi │ └── ic_launcher.png ├── layout │ └── main.xml ├── raw │ └── timeline_response.json └── values │ └── strings.xml └── src └── com └── jeremyhaberman └── restfulandroid ├── security └── test │ └── AuthorizationManagerTest.java └── test ├── TweetTest.java └── TwitterTimelineTest.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /bin 2 | /gen 3 | /docs/javadoc 4 | /test/bin 5 | /test/gen 6 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | RESTful Android 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 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | # RESTful Android 2 | 3 | RESTful Android is an attempt to implement the RESTful Android app architecture as described in [Developing Android REST client applications](http://www.google.com/events/io/2010/sessions/developing-RESTful-android-apps.html). 4 | 5 | # Third-party software 6 | 7 | This product contains the following library: 8 | 9 | scribe-java 10 | https://github.com/fernandezpablo85/scribe-java 11 | 12 | The MIT License 13 | 14 | Copyright (c) 2010 Pablo Fenandez 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining a copy 17 | of this software and associated documentation files (the "Software"), to deal 18 | in the Software without restriction, including without limitation the rights 19 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 20 | copies of the Software, and to permit persons to whom the Software is 21 | furnished to do so, subject to the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included in 24 | all copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 32 | THE SOFTWARE. 33 | -------------------------------------------------------------------------------- /RESTful Android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /assets/LICENSE.txt: -------------------------------------------------------------------------------- 1 | THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE CONTAINED IN PORTIONS OF THE RESTFUL ANDROID PRODUCT. 2 | 3 | ----- 4 | 5 | This product contains the following library: 6 | 7 | scribe-java 8 | https://github.com/fernandezpablo85/scribe-java 9 | 10 | The MIT License 11 | 12 | Copyright (c) 2010 Pablo Fenandez 13 | 14 | Permission is hereby granted, free of charge, to any person obtaining a copy 15 | of this software and associated documentation files (the "Software"), to deal 16 | in the Software without restriction, including without limitation the rights 17 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | copies of the Software, and to permit persons to whom the Software is 19 | furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in 22 | all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 27 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 29 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 30 | THE SOFTWARE. 31 | -------------------------------------------------------------------------------- /docs/android-developing-RESTful-android-apps.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyhaberman/restful-android/181aa5a232c0b27d3f41944bdc3907516e9b3697/docs/android-developing-RESTful-android-apps.pdf -------------------------------------------------------------------------------- /docs/generate-javadoc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | javadoc \ 4 | -d javadoc \ 5 | -doctitle "RESTful Android" \ 6 | -windowtitle "RESTful Android" \ 7 | -sourcepath ../src com.jeremyhaberman.restfulandroid \ 8 | -classpath $1 \ 9 | -subpackages com.jeremyhaberman.restfulandroid.activity:com.jeremyhaberman.restfulandroid.provider:com.jeremyhaberman.restfulandroid.security:com.jeremyhaberman.restfulandroid.service:com.jeremyhaberman.restfulandroid.util 10 | -------------------------------------------------------------------------------- /docs/javadoc-howto.txt: -------------------------------------------------------------------------------- 1 | Example: 2 | ./generate-javadoc.sh ~/dev/lib/android-sdk/platforms/android-7/android.jar:../lib/scribe-1.2.3.jar:../bin/classes/ 3 | -------------------------------------------------------------------------------- /docs/option-a.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyhaberman/restful-android/181aa5a232c0b27d3f41944bdc3907516e9b3697/docs/option-a.tiff -------------------------------------------------------------------------------- /lib/scribe-1.2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyhaberman/restful-android/181aa5a232c0b27d3f41944bdc3907516e9b3697/lib/scribe-1.2.3.jar -------------------------------------------------------------------------------- /proguard.cfg: -------------------------------------------------------------------------------- 1 | -optimizationpasses 5 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | -dontpreverify 5 | -verbose 6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 7 | 8 | -keep public class * extends android.app.Activity 9 | -keep public class * extends android.app.Application 10 | -keep public class * extends android.app.Service 11 | -keep public class * extends android.content.BroadcastReceiver 12 | -keep public class * extends android.content.ContentProvider 13 | -keep public class * extends android.app.backup.BackupAgentHelper 14 | -keep public class * extends android.preference.Preference 15 | -keep public class com.android.vending.licensing.ILicensingService 16 | 17 | -keepclasseswithmembernames class * { 18 | native ; 19 | } 20 | 21 | -keepclasseswithmembers class * { 22 | public (android.content.Context, android.util.AttributeSet); 23 | } 24 | 25 | -keepclasseswithmembers class * { 26 | public (android.content.Context, android.util.AttributeSet, int); 27 | } 28 | 29 | -keepclassmembers class * extends android.app.Activity { 30 | public void *(android.view.View); 31 | } 32 | 33 | -keepclassmembers enum * { 34 | public static **[] values(); 35 | public static ** valueOf(java.lang.String); 36 | } 37 | 38 | -keep class * implements android.os.Parcelable { 39 | public static final android.os.Parcelable$Creator *; 40 | } 41 | -------------------------------------------------------------------------------- /project.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 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | # Project target. 11 | target=android-7 12 | -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyhaberman/restful-android/181aa5a232c0b27d3f41944bdc3907516e9b3697/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-hdpi/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyhaberman/restful-android/181aa5a232c0b27d3f41944bdc3907516e9b3697/res/drawable-hdpi/refresh.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyhaberman/restful-android/181aa5a232c0b27d3f41944bdc3907516e9b3697/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeremyhaberman/restful-android/181aa5a232c0b27d3f41944bdc3907516e9b3697/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable/button_login.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /res/drawable/button_login_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/drawable/button_login_selected.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /res/drawable/progress.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /res/layout/about.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /res/layout/action_bar.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 14 | 15 |