0204 android X Android emulator not launching on Windows with 2.0 alpha releases X http://code.google.com/p/processing/issues/detail?id=899 X http://code.google.com/p/processing/issues/detail?id=769 X /opt/android using version #s again? fix build script (earlier) X smooth() is now the default _ lack of registerXxx() implementation is breaking pre() and post() in particles _ focus handling note: _ http://android-developers.blogspot.com/2011/11/making-android-games-that-play-nice.html _ if a sketch asks for android mode but it's not available _ (after a double-click) _ you get the "is android installed"? dialog, then it re-opens again _ without closing the other _ usb host and nfc reader need other changes to the app hierarchy to work _ http://code.google.com/p/processing/issues/detail?id=767 _ don't let the examples get overwritten with other mode stuff _ the whole sketch.properties thing is yech _ add INTERNET permissions to the android net examples _ go through all basics/topics examples _ remove those that don't make sense with android _ remove size() commands from most/all _ (or remove ones that truly require size...) _ optimize for android use _ need to set permissions as necessary (therefore add manifest files) lifecycle/size changes/etc _ pause/resume trickiness with interactive apps _ can we serialize objects (even if slow?) _ add pause() and resume() methods to PApplet -> this is start/stop _ need to smooth out screen orientation changes _ g2 and g3 are no longer disposed on pause (0195), but probably should be _ they're deleted when dispose() is called (on exit()) _ register(this, "pause") -> libs will need pause events on android _ add registered methods again _ need to figure out generic event queueing first _ may need a different subset of methods, and introduce new ones _ that will be usable on both android and desktop _ dispose() was calling disposeMethods.handle(), but they're null _ possible major issue with sketches not quitting out of run() when in bg _ pause needs to actually kill the thread _ returning from pause needs to reset the clock _ this is currently draining batteries _ thread is continually running - 'inside handleDraw()' running continually _ inside run() it shouldn't still be going _ need sizeChanged() method... _ also add the param to the xml file saying that it can deal w/ rotation _ temp files are not deleted _ http://code.google.com/p/processing/issues/detail?id=562 _ check out andres' changes for PShape _ re: android libraries, from shawn van every The most powerful part were the libraries (and the ease with which they could be developed). Location, SMS, Camera/Video, Bluetooth (for Arduino integration) and PClient/PRequest were by far the most used. The ones that came with it, plus the ones from MJSoft were good though I ended up making a couple of very specific ones for my students: http://www.mobvcasting.com/wp/?cat=4 _ separate activity and view _ process trackball events (they're only deltas) _ handle repeat key events _ implement link() _ need to post android examples _ try using the internal javac on windows and see if exceptions come through.. _ actually i think that might have been worse... _ instructions on installing the usb driver for windows _ http://developer.android.com/sdk/win-usb.html _ error in 'create avd' with "Emulator already exists" when it needs an upgrade _ or cannot be used with the current setup _ use 'android list avds' on the command line to see the problem in this case _ when there's a 'create avd' error, things still keep running. yay! _ need to do this for utf8: "overridable Ant javac properties: java.encoding" _ new for sdk tools r8, it's using ascii as the default, we're utf-8 _ error in 'create avd' with "Emulator already exists" when it needs an upgrade _ or cannot be used with the current setup _ use 'android list avds' on the command line to see the problem in this case _ when there's a 'create avd' error, things still keep running. yay! _ don't give user a "User cancelled attempt to find SDK" error message _ it's annoying.. they f*king know they just did that _ also gives an error if it unsets the sdk path itself, saying that the _ environment variable isn't set. which isn't true--it's set, but it doesn't _ think the location is valid, which is totally different. _ ...because it's ignoring the exception messages that come in from trying _ to create the new sdk object _ need to do something to make it easier to do new screen sizes. _ add method to bring up the keyboard in sketches _ actually, just write an example of how to do it, since holding menu works _ http://code.google.com/p/processing/issues/detail?id=234 _ sketches must be removed manually if the debug keystore changes _ http://code.google.com/p/processing/issues/detail?id=236 _ gui stuff: http://hg.postspectacular.com/cp5magic/wiki/Home _ "failed to get signature key" problem _ Caused by: /Users/aandnota/Documents/android-sdk-mac_x86/tools/ant/ant_rules_r3.xml:209: com.android.sdklib.build.ApkCreationException: Unable to get debug signature key _ android sdk/build location has changed (android-7 not 2.1) fix build.xml _ Blacked-out screen when restoring Android app from background. _ http://code.google.com/p/processing/issues/detail?id=381 _ probably related to the other thread hooey _ saveStream() on processing-android-core.zip breaks behind firewall _ downloads a 5kb html login page rather than the correct file _ salaryper crashed when connecting to ctr500 and was re-routed _ instead of sending back the gzip file, sent the error page _ unlike java, where a 404 would give us null data add to wiki _ add to wiki: 1MB file size is max for data folder _ Data exceeds UNCOMPRESS_DATA_MAX (11840328 vs 1048576) _ File storage = android.os.Environment.getExternalStorageDirectory(); _ File folder = new File(storage, "awesomeapp"); _ also check the data folder on run/export _ add to wiki: orientation(PORTRAIT) and orientation(LANDSCAPE) _ add to keywords.txt _ ctrl-F12 (ctrl-fn-f12 on mac) will rotate the emulator android menu _ something to bring up the full console window _ signing tool _ selection of which avd (emulator), or plugged-in devices (if multiple) _ change run/present/export/export application names in the menus _ throw an error if a file in the 'data' dir ends with .gz P1 _ exceptions with StreamPump and adb devices on osx and linux P1 _ http://dev.processing.org/bugs/show_bug.cgi?id=1545 P1 _ http://dev.processing.org/bugs/show_bug.cgi?id=1527 P1 _ when starting the emulator, the adb server gets reset P1 _ then it causes this exception, which kills the thread waiting for input P1 _ so another reset is necessary Exception in thread "StreamPump 49" java.lang.RuntimeException: Inside processing.app.exec.StreamPump@1ebe8ec for out: adb devices at processing.app.exec.StreamPump.run(StreamPump.java:82) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637) Caused by: java.io.IOException: Stream closed at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:145) at java.io.BufferedInputStream.read1(BufferedInputStream.java:255) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) at java.io.InputStreamReader.read(InputStreamReader.java:167) at java.io.BufferedReader.fill(BufferedReader.java:136) at java.io.BufferedReader.readLine(BufferedReader.java:299) at java.io.BufferedReader.readLine(BufferedReader.java:362) at processing.app.exec.StreamPump.run(StreamPump.java:71) ... 3 more _ additional manifest gui necessary: X icons are apparently important, android:icon X http://developer.android.com/guide/practices/ui_guidelines/icon_design.html _ on export (application) _ increment manifest/android:versionCode each time 'export' is called _ Remove the android:debuggable="true" attribute from _ provide manifest/android:versionName ('pretty' version number) _ setting the default package: manifest/package _ application/android:label _ used on home screen, manage applications, my downloads, etc _ http://developer.android.com/guide/publishing/preparing.html P1 _ implement certificates (self-signed) for distribution P1 _ http://developer.android.com/guide/publishing/app-signing.html P1 _ http://dev.processing.org/bugs/show_bug.cgi?id=1430 P1 _ http://code.google.com/p/processing/issues/detail?id=222 create new keystore location: [ ] (browse) password: [ ] confirm: [ ] ...then asks for alias, password, confirm, validity (years) first/last name, ounit, org, city/locale, state/province, country code (xx) _ StreamPump has been quieted, but maybe this needs to be a global log setting _ seems to have problems on 64-bit windows _ removing local version of java helped someone fix it _ don't let the keystore message show up in red _ Using keystore: /Users/fry/.android/debug.keystore X look into touch event code, see if there's a good way to integrate _ make a decision on how to integrate touch event code _ for libraries that don't work with android, don't let them export _ http://code.google.com/p/processing/issues/detail?id=248 _ add line for export in libraries to say whether they're compatible _ even just 'android=' will be ok _ or 'mode=java,android,python' _ error messages in runner that are handled special (OOME) need different _ handling for android vs others.. argh _ PShape examples are totally broken _ clean up changes from andres _ what is resetLights() in PGraphics? _ remove model() method from end of PApplet (make it shape(PShape)) P1 this is embarrassing, need to fix ASAP P2 need to fix before beta release P3 would like to fix before final release P4 not an immediate need, but very nice to have P5 nice to have android bugs, sorted by priority http://dev.processing.org/bugs/buglist.cgi?bug_status=&field0-0-0=product&type0-0-0=substring&value0-0-0=android&field0-0-1=component&type0-0-1=substring&value0-0-1=android&field0-0-2=short_desc&type0-0-2=substring&value0-0-2=android&field0-0-3=status_whiteboard&type0-0-3=substring&value0-0-3=android&query_format=advanced&order=bugs.priority,bugs.bug_status%2Cbugs.bug_id&query_based_on= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CORE (PApplet, P2D et al) P2 _ too many temporary objects (particularly w/ color) created with A2D P2 _ http://dev.processing.org/bugs/show_bug.cgi?id=1399 P3 _ mouseClicked() is currently missing P3 _ implement tap methods to handle mouseClicked() P3 _ http://dev.processing.org/bugs/show_bug.cgi?id=1406 P3 _ check on multiple pointers and multi-touch P3 _ http://dev.processing.org/bugs/show_bug.cgi?id=1491 P4 _ when returning to the application after link(), screen stays blank P4 _ http://dev.processing.org/bugs/show_bug.cgi?id=1484 P4 _ excessive rotation of application causes memory to run out P4 _ this probably means that some memory isn't being freed that should be P4 _ new window and surfaceview objects are being created in onCreate P4 _ so they should probably be taken down in onDestroy.. but how? P4 _ http://dev.processing.org/bugs/show_bug.cgi?id=1480 P4 _ values for pmouseX/Y aren't great P4 _ Examples > Topics > Drawing > Continuous Lines shows gaps P4 _ http://dev.processing.org/bugs/show_bug.cgi?id=1486 P5 _ Examples > Topics > Effects > Lens uses a ton of memory P5 _ resize() needs to use the android resize stuff P5 _ right now using the rather than expensive copy() P5 _ instead, create a new resized bitmap, and get rid of pixels[] P5 _ http://dev.processing.org/bugs/show_bug.cgi?id=1487 P5 _ should alpha PImage stuff use a non-4byte config? P5 _ http://dev.processing.org/bugs/show_bug.cgi?id=1490 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TOOLS J only send error text to System.err (i.e. "Launching emulator" is not an error) J send these debug log messages to System.out o "Sketch started on emulator" in spite of the emulator only halfway booted o sent email about this one _ errors in ActivityManager aren't coming through _ if AVD is deleted while processing still running, things flake out _ also no error messages, just 'giving up on launching emulator' // jdf maybedone _ when out of memory, need an error message to show up in the PDE _ show "OutOfMemoryError: bitmap size exceeds VM budget" in status area _ Examples > Topics > Drawing > Animator produces: _ Uncaught handler: thread Animation Thread exiting due to uncaught exception _ java.lang.OutOfMemoryError: bitmap size exceeds VM budget _ at android.graphics.Bitmap.nativeCreate(Native Method) // jdf maybedone _ stack overflow produced no error inside the PDE _ probably same as memory error above // jdf maybedone _ if hitting 'run' in p5, need to kill any sketch that's currently running _ need to make data folder copy more efficient than just copying everything _ right now, first copies to src inside Build.java (which then copies to bin) // jdf maybedone _ other exceptions coming through System.err W/System.err( 242): java.lang.IllegalArgumentException: File /data/data/processing.android.test.savemanyimages/files/circles-0001.tif contains a path separator W/System.err( 242): at android.app.ApplicationContext.makeFilename(ApplicationContext.java:1444) W/System.err( 242): at android.app.ApplicationContext.openFileOutput(ApplicationContext.java:386) W/System.err( 242): at android.content.ContextWrapper.openFileOutput(ContextWrapper.java:158) W/System.err( 242): at processing.core.PApplet.createOutput(PApplet.java:3677) P2 _ move the android tools into its own source package in SVN P2 _ started, but needs proper Tool or Mode packaging P2 _ http://code.google.com/p/processing/issues/detail?id=206 P2 _ implement method for selecting the AVD P2 _ http://dev.processing.org/bugs/show_bug.cgi?id=1390 P3 _ remove various debug messages on the console P3 _ right now, there are too many places where errors occur P3 _ http://dev.processing.org/bugs/show_bug.cgi?id=1385 P3 _ for now, only runs on the first device (findDevice()) found P3 _ --> implement selector to choose the default device for debugging P3 _ http://dev.processing.org/bugs/show_bug.cgi?id=1389 P3 _ if different machines, debug.keystore changes, requiring manual removal P3 _ or find a way to do it automatically with processing P3 _ adb -s HT91MLC00031 install -r sketchbook/Hue/android/bin/Hue-debug.apk P3 _ pkg: /data/local/tmp/Hue-debug.apk P3 _ Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES] P3 _ why does this result return 0? P3 _ can't keep it with the sketch, don't want to give away private key P3 _ with different machines, users are required to remove signature P3 _ add a method to remove an application if the debug key is different P3 _ perhaps the first time an application is installed, remove it? P3 _ http://dev.processing.org/bugs/show_bug.cgi?id=1481 P3 _ library support also needs android manifest changes P3 _ http://dev.processing.org/bugs/show_bug.cgi?id=1439 P4 _ don't require android tools to be installed already P4 _ or implement automatic download/install of android tools P4 _ http://dev.processing.org/bugs/show_bug.cgi?id=1383 EH _ Remove requirement for Google APIs in Android mode EH _ http://code.google.com/p/processing/issues/detail?id=613 PM _ Error for "android create avd" when the AVD is already installed PM - http://code.google.com/p/processing/issues/detail?id=614 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . EXAMPLES _ simple example of reading the compass (also note that won't work w/ sim) _ and also the gps, i assume (can do fake data w/ sim) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SAVED FOR LATER _ may need to add screen orientation as a built-in function _ fairly common to use, and otherwise needs an obscure import _ possibility of doing a compile (not run) using straight javac? _ this would be a faster way to check for errors _ w/o needing to use the incredibly slow android tools _ maybe the back button shouldn't quit apps, the home button should? _ back button use in apps is so infuriating... DL _ add clear and close to all stream methods? DL _ http://code.google.com/p/processing/issues/detail?id=244 EH _ separate "PApplet" into separate View and Activity classes EH _ http://code.google.com/p/processing/issues/detail?id=212 EM _ remove unnecessary processing.xml.* code from android-core EM _ http://code.google.com/p/processing/issues/detail?id=214 EM _ implement size() and createGraphics() for arbitrary renderers EM _ http://code.google.com/p/processing/issues/detail?id=241 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . OPTIMIZE / ENHANCEMENTS _ don't re-calculate stroke() or fill() when it's the same value _ should path.reset() or path.rewind() be used for a path to be reused? _ errors that cause a crash when setting sketchPath _ seems to be a filesystem that got too full _ no real signs of what went wrong, but deleting the avd fixed it _ if it reappears again, trap that condition, and tell the user the fix _ show/hide the virtual keyboard InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(surfaceView, 0); _ list contents of data folder (assets folder) try { PApplet.println(assets.list("")); } catch (IOException e) { e.printStackTrace(); } _ excessive memory use indicator _ D/dalvikvm( 1205): GC freed 814 objects / 523352 bytes in 58ms _ could help show when lots of memory are being used try { File root = Environment.getExternalStorageDirectory(); if (root.canWrite()){ File gpxfile = new File(root, "gpxfile.gpx"); FileWriter gpxwriter = new FileWriter(gpxfile); BufferedWriter out = new BufferedWriter(gpxwriter); out.write("Hello world"); out.close(); } } catch (IOException e) { Log.e(TAG, "Could not write file " + e.getMessage()); } _ application local storage: context.getFilesDir().getPath() "For those of you interested, the internal 8GB of storage on the phone is mounted at /emmc (r/w mode, of course) and microSD cards still shows up normally at /sdcard as expected." _ other useful tidbits (handlers etc) _ http://developer.android.com/guide/appendix/faq/commontasks.html