Permalink
Browse files

Updated twitter search sample to run with Ant

  • Loading branch information...
1 parent 72ccd2f commit f3b6bc0a2eef70733830e3c9f7ef0542d96101e5 @royclarkson royclarkson committed Mar 26, 2012
View
@@ -10,6 +10,7 @@ See the README in each directory for more information on the sample project and
* spring-android-showcase - The showcase contains client and server apps, and illustrates the features of Spring for Android.
* spring-android-news-reader - The news reader highlights the use of the Android ROME Feed Reader by retrieving RSS and Atom news feeds.
+* spring-android-twitter-search - The Twitter search app demonstrates an Android project including Spring for Android jars without the use of Maven's dependency management.
## Development Environment
@@ -1,7 +1,8 @@
.DS_Store
bin
gen
+local.properties
target
.project
.classpath
-.settings
+.settings
@@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0" >
- <uses-sdk android:minSdkVersion="15" />
+ <uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
@@ -0,0 +1,33 @@
+# Spring for Android Twitter Seach
+
+## Introduction
+
+The Spring for Android Twitter Search sample app demonstrates the use of [Spring for Android](http://www.springsource.org/spring-android) to make a RESTful request to the Twitter search API, without the use of Maven dependency management. This project requires set up of the Android SDK, and uses Ant to build and deploy the app to the emulator. See the main README at the root of this repository for more information about configuring your environment.
+
+## Build and Run the Android App
+
+1. Build the app in debug mode:
+
+ $ ant debug
+
+2. Start the emulator:
+
+ $ emulator @Default
+
+ _IMPORTANT: Ensure the emulator is fully initialized and ready or the deploy will fail._
+
+3. Deploy the app to the emulator:
+
+ $ ant installd
+
+4. From the emulator start the app
+
+## Troubleshooting
+
+You may need to update the build.xml for your installed version of the Android SDK.
+
+1. Delete the build.xml file from the root of this project
+
+2. Update your project:
+
+ $ android update project -p <project_directory>
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="SpringAndroidTwitterSearch" default="help">
+
+ <!-- The local.properties file is created and updated by the 'android' tool.
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <property file="local.properties" />
+
+ <!-- The ant.properties file can be created by you. It is only edited by the
+ 'android' tool to add properties to it.
+ This is the place to change some Ant specific build properties.
+ Here are some properties you may want to change/update:
+
+ source.dir
+ The name of the source directory. Default is 'src'.
+ out.dir
+ The name of the output directory. Default is 'bin'.
+
+ For other overridable properties, look at the beginning of the rules
+ files in the SDK, at tools/ant/build.xml
+
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems.
+
+ -->
+ <property file="ant.properties" />
+
+ <!-- The project.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+
+ This contains project specific properties such as project target, and library
+ dependencies. Lower level build properties are stored in ant.properties
+ (or in .classpath for Eclipse projects).
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems. -->
+ <loadproperties srcFile="project.properties" />
+
+ <!-- quick check on sdk.dir -->
+ <fail
+ message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
+ unless="sdk.dir"
+ />
+
+
+<!-- extension targets. Uncomment the ones where you want to do custom work
+ in between standard targets -->
+<!--
+ <target name="-pre-build">
+ </target>
+ <target name="-pre-compile">
+ </target>
+
+ /* This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir} */
+ <target name="-post-compile">
+ </target>
+-->
+
+ <!-- Import the actual build file.
+
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <import> task.
+ - customize it to your needs.
+ - Customize the whole content of build.xml
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, replacing the <import> task.
+ - customize to your needs.
+
+ ***********************
+ ****** IMPORTANT ******
+ ***********************
+ In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+ in order to avoid having your file be overridden by tools such as "android update project"
+ -->
+ <!-- version-tag: 1 -->
+ <import file="${sdk.dir}/tools/ant/build.xml" />
+
+</project>

0 comments on commit f3b6bc0

Please sign in to comment.