Fetching contributors…
Cannot retrieve contributors at this time
366 lines (287 sloc) 15.9 KB
0218 android
X add support for icon-96 for xhdpi icons
X switch to onBackPressed() for back button handling
X sync PVector plus the package
X "Smooth is not supported by this hardware (or driver)" message
X even with Nexus 4, Android 4.2.2
X "Bitmap size exceeds VM budget" error when loading many images
_ seems to not be printing newlines and indents when writing the xml files
X fixes for ecj compilation
X implement certificates (self-signed) for distribution
X implement automatic download/install of android tools
X also need to install USB Driver on Windows, and set device rules on Linux
_ make Android write .jar not .zip
_ figure out how to build from Eclipse JDI so we can remove tools.jar and javac
_ figure out Android build w/o javac so we can remove tools.jar and javac
_ also to the p5 repo with just a JRE
_ remove initRequirements from Base (no longer need JDI)
_ move this into Android mode?
_ temporary files (for sketches and logs) are not deleted
_ NullPointerException in AndroidBuild.writeLocalProps(
_ prompts for SDK, works; then after restart breaks again
_ also refers to ANDROID_HOME and not ANDROID_SDK..
_ are we using the right one these days?
_ this one is difficult to reproduce
_ Android emulator doesn't always start on the first attempt
_ emulator not starting up on OS X?
_ Android OPENGL renderer + JAVA2D PGraphics results in PTexture exception
_ focus handling note:
_ 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
_ don't let the examples get overwritten with mode settings, manifest, etc
_ the whole thing is yech
_ add INTERNET permissions to the android net examples
_ or other necessary permissions for other 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
_ avoid sketch restart on orientation change
_ need sizeChanged() method...
_ also add the param to the xml file saying that it can deal w/ rotation
_ 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:
_ process trackball events (they're only deltas)
_ implement link()
_ 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.
_ sketches must be removed manually if the debug keystore changes
_ "failed to get signature key" problem
_ Caused by: /Users/aandnota/Documents/android-sdk-mac_x86/tools/ant/ant_rules_r3.xml:209: Unable to get debug signature key
_ saveStream() on 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)
_ 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
_ 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
_ for libraries that don't work with android, don't let them export
_ 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
_ clean up changes from andres
_ what is resetLights() in PGraphics?
_ remove model() method from end of PApplet (make it shape(PShape))
_ PShape examples are totally broken
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)
_ implement blendMode() for Android
_ should be fairly straightforward given Java2D implementation
_ Finish implementation of OPEN and CHORD drawing modes for arc()
_ images resized with default renderer on Android are pixelated
_ implement tap detection and set correct click count for mouseClicked()
_ mouseClicked is currently not fired at all (no direct match on Android)
_ keyTyped() does not exist on Android
_ implement multiple pointers and multi-touch
_ Examples > Topics > Effects > Lens uses a ton of memory
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
_ 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 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 (which then copies to bin)
// jdf maybedone
_ other exceptions coming through System.err
W/System.err( 242): java.lang.IllegalArgumentException: File /data/data/ contains a path separator
W/System.err( 242): at
W/System.err( 242): at
W/System.err( 242): at android.content.ContextWrapper.openFileOutput(
W/System.err( 242): at processing.core.PApplet.createOutput(
_ 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.
_ move the Android tools into its own source package in SVN
_ started, but needs proper Tool or Mode packaging
_ implement method for selecting the AVD
_ implement means to use Intel version of the emulator
_ need to verify if this is much faster or not
P3 _ for now, only runs on the first device (findDevice()) found
P3 _ --> implement selector to choose the default device for debugging
P3 _
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 _ 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 _
P3 _ library support also needs android manifest changes
P3 _
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
_ 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)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
_ 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...
_ separate "PApplet" into separate View and Activity classes
_ re-implement to use Fragment API
_ and what about daydream or widgets or whatever?
_ implement size() and createGraphics() for arbitrary renderers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
_ 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 {
} catch (IOException e) {
_ 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");
} 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)