diff --git a/android/todo.txt b/android/todo.txt index 0730b372c..8b4e56e07 100644 --- a/android/todo.txt +++ b/android/todo.txt @@ -4,13 +4,15 @@ o http://code.google.com/p/processing/issues/detail?id=421 o this is the download page: o http://code.google.com/p/processing/downloads/detail?name=processing-android-core-0191.zip o so look for "SHA1 Checksum: 1ed63f9316441fe46949ef5a92a28f58cc7ee226" +X just use generic android apis as requirement, not the google apis +X though it does give us the emulator skin.. maybe another option + +_ need sizeChanged() method... +_ also add the param to the xml file saying that it can deal w/ rotation _ try using the internal javac on windows and see if exceptions come through.. _ actually i think that might have been worse... -_ just use generic android apis as requirement, not the google apis -_ though it does give us the emulator skin.. maybe another option - _ instructions on installing the usb driver for windows _ http://developer.android.com/sdk/win-usb.html diff --git a/app/src/processing/mode/android/AndroidBuild.java b/app/src/processing/mode/android/AndroidBuild.java index b71a85959..d27b0ad1b 100644 --- a/app/src/processing/mode/android/AndroidBuild.java +++ b/app/src/processing/mode/android/AndroidBuild.java @@ -225,15 +225,15 @@ class AndroidBuild extends JavaBuild { } - public boolean exportProject() throws IOException, SketchException { + public File exportProject() throws IOException, SketchException { File projectFolder = build("debug"); if (projectFolder == null) { - return false; + return null; } File exportFolder = createExportFolder(); Base.copyDir(projectFolder, exportFolder); - return true; + return exportFolder; } diff --git a/app/src/processing/mode/android/AndroidEditor.java b/app/src/processing/mode/android/AndroidEditor.java index d53e83a29..61b54892b 100644 --- a/app/src/processing/mode/android/AndroidEditor.java +++ b/app/src/processing/mode/android/AndroidEditor.java @@ -35,6 +35,7 @@ import processing.app.Mode; import processing.app.SketchException; import processing.core.PApplet; import processing.mode.java.JavaEditor; +import processing.mode.java.JavaToolbar; // http://dl.google.com/android/repository/repository.xml // http://dl.google.com/android/android-sdk_r3-mac.zip @@ -355,15 +356,28 @@ public class AndroidEditor extends JavaEditor { * If users want a debug build, they can do that from the command line. */ public void handleExportProject() { - AndroidBuild build = new AndroidBuild(sketch, amode); - try { - if (build.exportProject()) { - statusNotice("Done with export."); - } - } catch (IOException e) { - statusError(e); - } catch (SketchException e) { - statusError(e); + if (handleExportCheckModified()) { + new Thread() { + public void run() { + toolbar.activate(AndroidToolbar.EXPORT); + startIndeterminate(); + statusNotice("Exporting a debug version of the sketch..."); + AndroidBuild build = new AndroidBuild(sketch, amode); + try { + File exportFolder = build.exportProject(); + if (exportFolder != null) { + Base.openFolder(exportFolder); + statusNotice("Done with export."); + } + } catch (IOException e) { + statusError(e); + } catch (SketchException e) { + statusError(e); + } + stopIndeterminate(); + toolbar.deactivate(AndroidToolbar.EXPORT); + } + }.start(); } // try { diff --git a/app/src/processing/mode/android/AndroidRunner.java b/app/src/processing/mode/android/AndroidRunner.java index 3c7a3ffac..b2f05ab65 100644 --- a/app/src/processing/mode/android/AndroidRunner.java +++ b/app/src/processing/mode/android/AndroidRunner.java @@ -84,7 +84,7 @@ public class AndroidRunner implements DeviceListener { } else { listener.statusError("Could not start the sketch."); } - + listener.stopIndeterminate(); lastRunDevice = device; //} finally { // build.cleanup(); @@ -273,7 +273,7 @@ public class AndroidRunner implements DeviceListener { } } - + // called by AndroidMode.handleStop()... public void close() { if (lastRunDevice != null) { @@ -284,6 +284,7 @@ public class AndroidRunner implements DeviceListener { // sketch stopped on the device public void sketchStopped() { + listener.stopIndeterminate(); listener.statusHalt(); } }