Files
processing4/android/todo.txt
2012-09-10 16:25:04 +00:00

384 lines
16 KiB
Plaintext

0211 android
X implement registerMethod(keyEvent) (motion and mouse still unavailable)
motion/touch events
_ registerMethod("motionEvent") and "mouseEvent" not implemented
_ PMotionEvent is being used internal to PApplet, need to re-wrap
_ should be able to fire MotionEvents
_ modify MotionEvent code to use TouchEvent class, even if basic version
_ internally, PApplet might subclass it for the pointers
_ but queueing needs to work
_ coordinates from motionX/Y reportedly inconsistent
_ http://code.google.com/p/processing/issues/detail?id=1018
_ Android emulator doesn't always start on the first attempt
_ http://code.google.com/p/processing/issues/detail?id=1210
_ inside AndroidPreprocessor
_ processing.mode.java.JavaBuild.scrubComments(sketch.getCode(0).getProgram())
_ PApplet.match(scrubbed, processing.mode.java.JavaBuild.SIZE_REGEX);
_ test libraries on android
_ no ES2 in the emulator, and no error reported in the PDE
_ problem is probably that the error comes via E/AndroidRuntime
_ java.lang.RuntimeException: Unable to start activity ComponentInfo{processing.test.fisheye/processing.test.fisheye.FishEye}: java.lang.RuntimeException: P3D: OpenGL ES 2.0 is not supported by this device.
_ Android OPENGL renderer + JAVA2D PGraphics results in PTexture exception
_ http://code.google.com/p/processing/issues/detail?id=1019
_ 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
_ 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())
_ 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
_ 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
_ 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
_ implement certificates (self-signed) for distribution
_ http://developer.android.com/guide/publishing/app-signing.html
_ 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
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CORE (PApplet, P2D et al)
_ too many temporary objects (particularly w/ color) created with A2D
_ http://code.google.com/p/processing/issues/detail?id=213
_ mouseClicked() is currently missing
_ implement tap methods to handle mouseClicked()
_ http://code.google.com/p/processing/issues/detail?id=215
_ check on multiple pointers and multi-touch
_ http://code.google.com/p/processing/issues/detail?id=243
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://code.google.com/p/processing/issues/detail?id=235
P4 _ values for pmouseX/Y aren't great
P4 _ Examples > Topics > Drawing > Continuous Lines shows gaps
P4 _ http://code.google.com/p/processing/issues/detail?id=238
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://code.google.com/p/processing/issues/detail?id=239
P5 _ should alpha PImage stuff use a non-4byte config?
P5 _ http://code.google.com/p/processing/issues/detail?id=242
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TOOLS
_ 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://code.google.com/p/processing/issues/detail?id=208
P3 _ for now, only runs on the first device (findDevice()) found
P3 _ --> implement selector to choose the default device for debugging
P3 _ http://code.google.com/p/processing/issues/detail?id=207
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://code.google.com/p/processing/issues/detail?id=236
P3 _ library support also needs android manifest changes
P3 _ http://code.google.com/p/processing/issues/detail?id=225
P4 _ don't require android tools to be installed already
P4 _ or implement automatic download/install of android tools
P4 _ http://code.google.com/p/processing/issues/detail?id=203
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 _ 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