summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
l---------README1
-rw-r--r--README.txt19
-rw-r--r--build.xml2
-rwxr-xr-xrun.sh12
4 files changed, 19 insertions, 15 deletions
diff --git a/README b/README
new file mode 120000
index 00000000..c3ca0746
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
+README.txt \ No newline at end of file
diff --git a/README.txt b/README.txt
index badaaf54..7d57a6e3 100644
--- a/README.txt
+++ b/README.txt
@@ -12,8 +12,7 @@ Instructions to compile
-----------------------
1. cd $PROJECT_LOCATION/leap_android
-2. android update project --path $PROJECT_LOCATION/leap_android/
-3. ant debug
+2. ./compile.sh
Postconditions
--------------
@@ -33,9 +32,8 @@ Preconditions
Instructions to run on the emulator
-----------------------------------
-1. Run emulator: emulator @AVD-NAME (avd names are the names of the files in ~/.android/avd with extension .avd).
- - If you want to test the app from scratch, run emulator -wipe-data @AVD-NAME
-2. Run app: adb shell am start se.leap.leapclient/.Dashboard
+1. cd $PROJECT_LOCATION/leap_android
+1. Run script: ./run.sh @AVD-NAME . (avd names are the names of the files in ~/.android/avd with extension .avd).
Postconditions
--------------
@@ -56,17 +54,12 @@ Preconditions
Instructions to debug from the console
-----------------------------------
-1. emulator @AVD-NAME # (avd names are the names of the files in ~/.android/avd with extension .avd).
- - emulator -wipe-data @AVD-NAME # If you want to test the app from scratch
-2. adb install -r $PROJECT_LOCATION/leap_android/bin/LEAP\ Android-debug.apk # Install the new version of the application
-3. adb shell am start -D se.leap.leapclient/.Dashboard # Run app
-4. pid=`adb shell ps | grep leap | awk '{print $2}'` # Identify the process id (pid) of the current leapclient process instance
-5. localport=`expr $RANDOM % 65536`
-6. adb forward tcp:$localport jdwp:$pid
-7. jdb -sourcepath $PROJECT_LOCATION/leap_android/src/ -attach localhost:$localport
+1. cd $PROJECT_LOCATION/leap_android
+2. Run script: ./debug.sh @AVD-NAME . (avd names are the names of the files in ~/.android/avd with extension .avd).
Postconditions
--------------
1. LEAP Android is running.
2. LEAP Android does not show the message "Application LEAP for Android (process se.leap.leapclient) is waiting for the debugger to attach".
+3. You are in a jdb debuggin session.
diff --git a/build.xml b/build.xml
index 538f2eee..a10a9149 100644
--- a/build.xml
+++ b/build.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project name="LEAP Android" default="help">
+<project name="MainActivity" 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
diff --git a/run.sh b/run.sh
index eace457e..b5a08612 100755
--- a/run.sh
+++ b/run.sh
@@ -22,7 +22,17 @@ wait_until_booted() {
echo "Emulator booted!"
}
-emulator -wipe-data @$avd_name & # If you want to test the app from scratch
+echo "Press \"y\" key and enter if you want to wipe emulator's data"
+read wipe_data_or_not
+if [ $wipe_data_or_not == "y" ]
+then
+ echo "Wiping data"
+ emulator -wipe-data @$avd_name & # If you want to test the app from scratch
+else
+ echo "Not wiping data"
+ emulator @$avd_name & # If you want to test the app from scratch
+fi
+
wait_until_booted
adb install -r $PROJECT_FOLDER/bin/LEAP\ Android-debug.apk # Install the new version of the application
adb shell am start se.leap.leapclient/.Dashboard # Run app