Files
processing4/android/todo.txt

387 lines
17 KiB
Plaintext

0193 android
_ 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 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
_ just use generic android apis as requirement, not the google apis
_ though it does give us the emulator skin.. maybe another option
_ need to do something to make it easier to do new screen sizes.
_ when returning to android application, sometimes screen stays black
_ http://code.google.com/p/processing/issues/detail?id=237
_ .java files are reported with Syntax Error with the Android build 0191
_ http://code.google.com/p/processing/issues/detail?id=404
_ register(this, "pause") -> libs will need pause events on android
_ thread is continually running - 'inside handleDraw()' running continually
_ inside run() it shouldn't still be going
_ Error 336 Can't run any sketch.
_ http://code.google.com/p/processing/issues/detail?id=393
_ javac.exe not included with the download
_ verify that processing-core.jar has downloaded properly
_ http://code.google.com/p/processing/issues/detail?id=421
_ this is the download page:
_ http://code.google.com/p/processing/downloads/detail?name=processing-android-core-0191.zip
_ so look for "SHA1 Checksum: 1ed63f9316441fe46949ef5a92a28f58cc7ee226"
_ 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 debug certificate expired
_ http://forum.processing.org/topic/ant-rules-r3-xml-209-395-error#25080000000262001
_ just delete ~/.android/debug.keystore
Try renaming the .android folder in your home directory to something else. Next time you try to build, it should re-create the .android folder with a proper debug certificate. If you don't know what that means, do this:
1. Open /Applications/Utilities/Terminal.app
2. type "mv .android .android.bad"
3. Try running a sketch again
It's an Android SDK problem (not a Processing problem), but we're still trying to figure out why it's happening.
_ 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 <application>
_ 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
_ 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
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
_ 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
_ "Unable to resolve target 'Google...'" when APIs aren't installed
_ add an error message that explains what to do
_ 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
DL _ colorMode() error
DL _ http://code.google.com/p/processing/issues/detail?id=223
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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://dev.processing.org/bugs/show_bug.cgi?id=1388
P2 _ implement method for selecting the AVD
P2 _ http://dev.processing.org/bugs/show_bug.cgi?id=1390
P2 _ android mode is currently per-editor (and clunky)
P2 _ http://dev.processing.org/bugs/show_bug.cgi?id=1379
P2 _ save state re: whether sketches are android or java mode (or others?)
P2 _ http://dev.processing.org/bugs/show_bug.cgi?id=1380
DM _ compiler errors on Windows not appearing, nor highlighting the line number
DM _ http://code.google.com/p/processing/issues/detail?id=253
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 _ 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
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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