diff --git a/NOTICE b/NOTICE index 871aaf9..8db9abc 100644 --- a/NOTICE +++ b/NOTICE @@ -1,4 +1,4 @@ -Spring for Android Samples 1.0.0.RC1 +Spring for Android Samples 1.0.0.RELEASE Copyright (c) 2010-2012 VMware, Inc. All Rights Reserved. This product is licensed to you under the Apache License, Version 2.0 (the "License"). diff --git a/spring-android-facebook-client/.gitignore b/spring-android-facebook-client/.gitignore new file mode 100644 index 0000000..2f1df96 --- /dev/null +++ b/spring-android-facebook-client/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +bin +gen +target +.project +.classpath +.settings diff --git a/spring-android-facebook-client/AndroidManifest.xml b/spring-android-facebook-client/AndroidManifest.xml new file mode 100644 index 0000000..fea0b98 --- /dev/null +++ b/spring-android-facebook-client/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-android-facebook-client/README.md b/spring-android-facebook-client/README.md new file mode 100644 index 0000000..d7b50fc --- /dev/null +++ b/spring-android-facebook-client/README.md @@ -0,0 +1,36 @@ +# Spring for Android Facebook Client + +## Introduction + +This sample app includes an Android client which connects to Twitter. This illustrate the integration of [Spring Social](http://www.springsource.org/spring-social) with [Spring for Android](http://www.springsource.org/spring-android). The Android client project requires set up of the Android SDK. See the main README at the root of this repository for more information about configuring your environment. + +## Build and Run the Android Client + +1. Navigate to the client directory: + + $ cd spring-android-facebook-client + +2. Build the app: + + $ mvn clean install + +3. Start the emulator using the Android Maven Plugin: + + $ mvn android:emulator-start + + Alternatively, you can start the emulator using the Android command line tools: + + $ emulator @Default + + _IMPORTANT: Ensure the emulator is fully initialized and ready or the deploy will fail._ + +4. Deploy the app to the emulator: + + $ mvn android:deploy + +5. Start the sample app: + + $ mvn android:run + + _Note: the Android Maven Plugin will attempt to deploy and run the app to all available devices, both emulators and physical devices attached to your computer._ + diff --git a/spring-android-facebook-client/pom.xml b/spring-android-facebook-client/pom.xml new file mode 100644 index 0000000..a2c24df --- /dev/null +++ b/spring-android-facebook-client/pom.xml @@ -0,0 +1,197 @@ + + 4.0.0 + + org.springframework.android + spring-android-facebook-client + 1.0.0.RELEASE + apk + spring-android-facebook-client + http://www.springsource.org/spring-android + + SpringSource + http://www.springsource.org + + + + 15 + 3.2.0 + 2.3.2 + 1.6 + 2.8 + 4.0.1.2 + + 1.0.0.RELEASE + 1.0.2.RELEASE + 1.0.1.RELEASE + 3.1.0.RELEASE + 1.9.7 + + + + + com.google.android + android + ${com.google.android-version} + provided + + + org.springframework.android + spring-android-rest-template + ${org.springframework.android-version} + + + org.springframework.android + spring-android-auth + ${org.springframework.android-version} + + + org.springframework.security + spring-security-crypto + ${org.springframework.security-version} + + + + spring-core + org.springframework + + + + + org.springframework.social + spring-social-core + ${org.springframework.social-version} + + + + spring-web + org.springframework + + + + commons-logging + commons-logging + + + + + org.springframework.social + spring-social-facebook + ${org.springframework.social-facebook-version} + + + + commons-logging + commons-logging + + + + + + org.codehaus.jackson + jackson-mapper-asl + ${org.codehaus.jackson-version} + + + + + + + springsource-snapshot + SpringSource Snapshot Repository + http://repo.springsource.org/snapshot + + false + + + true + + + + + springsource-milestone + SpringSource Milestone Repository + http://repo.springsource.org/milestone + + false + + + + + springsource-repo + SpringSpring Repository + http://repo.springsource.org/release + + false + + + + + + ${project.artifactId} + src + + + com.jayway.maven.plugins.android.generation2 + android-maven-plugin + ${android-maven-plugin-version} + + + ${android-platform} + + true + true + + true + + + maven-compiler-plugin + ${maven-compiler-plugin-version} + + ${java-version} + ${java-version} + + + + org.apache.maven.plugins + maven-eclipse-plugin + ${maven-eclipse-plugin-version} + + true + true + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + com.jayway.maven.plugins.android.generation2 + android-maven-plugin + [3.1.1,) + + proguard + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-android-facebook-client/proguard.cfg b/spring-android-facebook-client/proguard.cfg new file mode 100644 index 0000000..b1cdf17 --- /dev/null +++ b/spring-android-facebook-client/proguard.cfg @@ -0,0 +1,40 @@ +-optimizationpasses 5 +-dontusemixedcaseclassnames +-dontskipnonpubliclibraryclasses +-dontpreverify +-verbose +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* + +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference +-keep public class com.android.vending.licensing.ILicensingService + +-keepclasseswithmembernames class * { + native ; +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet); +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet, int); +} + +-keepclassmembers class * extends android.app.Activity { + public void *(android.view.View); +} + +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} diff --git a/spring-android-facebook-client/project.properties b/spring-android-facebook-client/project.properties new file mode 100644 index 0000000..8da376a --- /dev/null +++ b/spring-android-facebook-client/project.properties @@ -0,0 +1,11 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-15 diff --git a/spring-android-facebook-client/res/drawable-hdpi/spring_android.png b/spring-android-facebook-client/res/drawable-hdpi/spring_android.png new file mode 100644 index 0000000..8a61220 Binary files /dev/null and b/spring-android-facebook-client/res/drawable-hdpi/spring_android.png differ diff --git a/spring-android-facebook-client/res/drawable-ldpi/spring_android.png b/spring-android-facebook-client/res/drawable-ldpi/spring_android.png new file mode 100644 index 0000000..8455214 Binary files /dev/null and b/spring-android-facebook-client/res/drawable-ldpi/spring_android.png differ diff --git a/spring-android-facebook-client/res/drawable-mdpi/spring_android.png b/spring-android-facebook-client/res/drawable-mdpi/spring_android.png new file mode 100644 index 0000000..3bb1843 Binary files /dev/null and b/spring-android-facebook-client/res/drawable-mdpi/spring_android.png differ diff --git a/spring-android-facebook-client/res/drawable/spring09_logo.png b/spring-android-facebook-client/res/drawable/spring09_logo.png new file mode 100644 index 0000000..7917c9d Binary files /dev/null and b/spring-android-facebook-client/res/drawable/spring09_logo.png differ diff --git a/spring-android-showcase/client/res/layout/facebook_activity_layout.xml b/spring-android-facebook-client/res/layout/facebook_activity_layout.xml similarity index 72% rename from spring-android-showcase/client/res/layout/facebook_activity_layout.xml rename to spring-android-facebook-client/res/layout/facebook_activity_layout.xml index 49bf8d2..afe3fc9 100644 --- a/spring-android-showcase/client/res/layout/facebook_activity_layout.xml +++ b/spring-android-facebook-client/res/layout/facebook_activity_layout.xml @@ -1,31 +1,26 @@ + android:orientation="vertical" > - + android:text="@string/facebook_description" /> + - + android:layout_height="fill_parent" > + - + android:layout_height="fill_parent" /> - - + + \ No newline at end of file diff --git a/spring-android-facebook-client/res/layout/facebook_feed_list_item.xml b/spring-android-facebook-client/res/layout/facebook_feed_list_item.xml new file mode 100644 index 0000000..15903d6 --- /dev/null +++ b/spring-android-facebook-client/res/layout/facebook_feed_list_item.xml @@ -0,0 +1,27 @@ + + + + + + + + + + \ No newline at end of file diff --git a/spring-android-showcase/client/res/layout/facebook_wall_post_activity_layout.xml b/spring-android-facebook-client/res/layout/facebook_wall_post_activity_layout.xml similarity index 72% rename from spring-android-showcase/client/res/layout/facebook_wall_post_activity_layout.xml rename to spring-android-facebook-client/res/layout/facebook_wall_post_activity_layout.xml index fcc8afc..f9492b7 100644 --- a/spring-android-showcase/client/res/layout/facebook_wall_post_activity_layout.xml +++ b/spring-android-facebook-client/res/layout/facebook_wall_post_activity_layout.xml @@ -1,34 +1,30 @@ - + android:orientation="vertical" > + - + android:text="What's on your mind?" /> + - + android:padding="8dip" /> +