Git Product home page Git Product logo

processing-android-archive's Introduction

Since the release of Processing 3.5.4 in January 2020, development has moved to a new repository.

Using a 4.0 release (even an alpha or beta version) is recommended if you find an issue. To avoid confusion, this repo will remain open at least until a 4.0 release is the default download at https://processing.org/download. We chose to move to a new repository so that we could clean out old files accumulated over the last 20 years.

Processing

This is the official source code for the Processing Development Environment (PDE), the “core” and the libraries that are included with the download.

I've found a bug! Let us know here (after first checking if someone has already posted a similar problem). If it's a reference, web site, or examples issue, take that up with folks here. There are also separate locations for Android Mode, or the Video and Sound libraries. The processing.js project is not affiliated with us, but you can find their issue tracker here.

Locked Issues Where possible, I've started locking issues once resolved. This helps reduce the amount of noise from folks adding to an issue that's been closed for years. Because this project has existed for a long time and we have thousands of closed issues, lots of them may sound similar to an issue you're having. But if there's a new problem, it'll be missed if it's lost in a comment added to an already closed issue. I don't like to lock issues because it cuts off conversation, but it's better than legitimate problems being missed. Once an issue has been resolved for 30 days, it will automatically lock.

That processing-bugs fella is suspicious. The issues list has been imported from Google Code, so there are many spurious references amongst them since the numbering changed. Basically, any time you see references to changes made by processing-bugs, it may be somewhat suspect. Over time this will clean itself up as bugs are fixed and new issues are added from within GitHub. Help speed this process along by helping us!

Please help. The instructions for building the source are here. Please help us fix problems, and if you're submitting code, following the style guidelines helps save me a lot of time.

And finally... Someday we'll also fix all these bugs, throw together hundreds of unit tests, and get rich off all this stuff that we're giving away for free. But not today.

So in the meantime, I ask for your patience, participation, and patches.

Ben Fry, 20 January 2019

processing-android-archive's People

Contributors

benfry avatar boubpopsyteam avatar codeanticode avatar imilka avatar joshgiesbrecht avatar lonnen avatar reas avatar shiffman avatar ybakos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

processing-android-archive's Issues

PVector.set(float float) method does not exist as it should according to documentation and java mode

In Android mode, the PVector class does not have the same convenience method signature for the set() method.

PVector v;
v = new PVector();
v.set(10.0, 20.0);

will result in the compile error:

cannot find symbol
[javac] symbol : method set(float,float)
[javac] location: class processing.core.PVector

This error is not present in java mode, and is rectified in android mode by supplying three floats to the set() method: set(float, float, float)
Recommend adding set(float, float) for consistency with java mode.

PImage.resize() always causes crash

calling the method PImage.resize() causes the application to crash (also referenced here: https://forum.processing.org/topic/problem-with-pimage-resize ) when run on Android with the following error:

FATAL EXCEPTION: Animation Thread
java.lang.NullPointerException
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:344)
at processing.core.PImage.resize(Unknown Source)
at processing.test.CreateImage.CreateImage.setup(CreateImage.java:35)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:1019)

For a reference the following extension of the CreateImage example can be used:

PImage img;
void setup() 
{
  size(200, 200);
  img = createImage(120, 120, ARGB);
  for(int i=0; i < img.pixels.length; i++) {
    img.pixels[i] = color(0, 90, 102, i%img.width * 2); 
  }
  img.resize(150,100);
}
void draw() 
{
  background(204);
  image(img, 33, 33);
  image(img, mouseX-60, mouseY-60);
}

Although this may be replaced with call of the image() method with height and width specified, for animating sprites this adds unnecessary computational burden to rescale an image 30 times a second.

Update Android section of Processing Wiki

Since the Android section of the Processing Wiki seems to be the main source of install, setup, and coding instructions for the Android mode, I'd like to suggest that it could use a fairly extensive revision. I'd be happy to volunteer for the job, but wanted to first engage the other stakeholders in conversation and see what made the most sense, or if there were opinions about what to add/change.

My suggestions are:

  • The single page is now much too long, and should be broken into separate pages
  • I would suggest a page for install/setup/testing, basics, and maybe separate pages for individual examples like touch, internet, sensors, icons, etc like we have for the desktop version
  • If anyone has experience uploading a Processing-built app to Google Play, I think that would be a very interesting tutorial too
  • An overall cleanup of the text to be easier to read (I like verbose, but it can be a bit hard to follow, speaking from my experience setting up the IDE from the Wiki)

I would also guess that some of the new additions might be helpful filling out the example sketches - I'd be delighted to help with that as well.

'Processing & Android: Mobile App Development Made (Very) Easy' on Eclipse ADT need help

Hi,

I had tried using the sample/tutorial given by Jer Thorp and had tried implementing it on Eclipse ADT. I had imported the android-core.jar from the processing 2.0 into the Eclipse Libs folder. However when I copied the sample codes into Eclipse ADT, it highlights the "background(mouseY * (255.0/800), 100, 0);" in the "draw method as below and state that "The method background(int, float) in the type PApplet is not applicable for the arguments (double, int, int)".

public void draw() {
//Set the background colour, which gets more red as we move our finger
//down the screen.
background(mouseY * (255.0/800), 100, 0);
//Chane our box rotation depending on how our finger has moved right-to-left
boxRotation += (float) (pmouseX - mouseX)/100;

   //Draw the ball-and-stick
   line(width/2, height/2, mouseX, mouseY);
   ellipse(mouseX, mouseY, 40, 40);

   //Draw the box
   pushMatrix();
     translate(width/2, height/2);
     rotate(boxRotation);
     rect(0,0, 150, 150);
   popMatrix();
 };

And if I change the code from"255.0" to "255" such as "background(mouseY * (255/800), 100, 0);", the emulator can execute the application successfully using Eclipse ADT, however the colouring functionality when I hover around will be lost.
Could anyone please help me or teach me how to fix this ?

Thanking you in anticipation.

PShape (.obj and .mtl) materials ignored in Android Mode

If I use a .obj file with a .mtl and NO texture (uv map) all models materials are ignored and a transparent light-blue material is used instead.

Example loadDisplayOBJ works fine because it has a uvmap texture. Try some models with no texture and you'll see! ;-)

reduce size of processing-android git project

It's currently a 1.4 GB repo. Lots of things that can be removed, probably via filter-branch, but just needs someone to do the careful work of cleaning it without losing version history and authorship.

AndroidManifest "android:debuggable=true" in the exported one.

When exporting the Android Application AndroidManifest.xml doesn't set debug to false, and fails when uploading it to Google Play after signing the apk.

I think it should be modified or commented in the Wiki. I wish I could do that, but I don't even know if the Manifest.java applies to the default or the exported file.

back button causes app shutdown with no call to keyPressed() or onPause()

As per this comment thread of mixed results:
https://forum.processing.org/topic/android-prevent-back-button-from-exiting

And also my own experience using Android 4.0.

Have tried a 'print("KEY PRESSED");' debug line at the top of keyPressed() and it never happens when I press the back button. What's worse is that onPause() is also never called, meaning the app doesn't get a chance to cleanly save state before exiting. On normal exiting by pressing the Home button, onPause() is run and works great.

Processing can't create emulator.

There is a problem when you start a sketch for the first time and have multiple Android APIs installed on your machine. I tried creating the virtual device with the command I found in the Processing console. If there is more than one ABI installed on the machine, you need to specify which one to use. Adding --abi x86 at the end of this command does create the right virtual device. Sketches can run without a problem now.

This is the output of the terminal:

Cloudswimmers-MBP:tools janvantomme$ ./android create avd -n Processing-0217 -t android-10 -c 64M -s WVGA800
Valid ABIs: armeabi, x86
Error: This platform has more than one ABI. Please specify one using --abi.
Cloudswimmers-MBP:tools janvantomme$ ./android create avd -n Processing-0217 -t android-10 -c 64M -s WVGA800 --abi x86
Android 2.3.3 is a basic Android platform.
Do you wish to create a custom hardware profile [no]n
Created AVD 'Processing-0217' based on Android 2.3.3, Intel Atom (x86) processor,
with the following hardware config:
hw.lcd.density=240
vm.heapSize=24
hw.ramSize=256
Cloudswimmers-MBP:tools janvantomme$

App crashed in P3D mode on Nexus 4 Android 4.2.2

When adding P3D in size() even a basic app crashes at start:

Error:
Smooth is not supported by this hardware (or driver)

smooth(); isn't called in the sketch. Adding noSmooth(); to the sketch does not help.

Device:
Nexus 4
Android 4.2.2

Processing 2.0b8

add support for icon-96 for xhdpi icons

xhdpi resolution is used by default on some devices, e.g. Samsung Galaxy S3. Processing should understand icon-96.png in the data folder, and generate an xhdpi icon from it. Otherwise, we get the generic Processing icon, which is not desirable.

External config of Android SDK version

Please enable an external configuration of the Android SDK version.

Currently it's static set in AndroidBuild.java. It could be added to mode.properties file.

I recompiled processing-android for SDK 19 (Android 4.3) in order to enable USB support without problems. Is there an other way to define the Android SDK version?

curveVertex bug

Processing Android curveVertex bug,
the code is as follows:
fill(#FFEC8B);
beginShape();
curveVertex(0, 10);
curveVertex(0, 10);
curveVertex(100, 10);
curveVertex(100, 30);
curveVertex(0, 30);
curveVertex(0, 30);
endShape();

fill(#FFB6C1);
beginShape();
curveVertex(0, 50);
curveVertex(0, 50);
curveVertex(100, 50);
curveVertex(100, 80);
curveVertex(0, 80);
curveVertex(0, 80);
endShape();

The result is the color of the first shape will be the color of the second.
you can run it in android environment

PShape getVertex() not implemented properly for SVG files

Steps to reproduce the error:

  1. load any svg
  2. get a PShape that has Vertices (printing the Count to the Console works)
  3. get any of the Vertices

Expected output: return a PVector
Get instead: ArrayIndexOutOfBoundsException: 2

Originally this bug was filed for desktop version of processing under this issue:
processing/processing#1596

Later it was fixed in desktop version of processing with this commit:
processing/processing@72e2b04

This is link to getVertex(int, PVector) method which is errorneous
https://github.com/processing/processing-android/blob/master/core/src/processing/core/PShape.java#L1980

mousePressed event lost after menu key pressed (on newer Android versions only?)

As per this on the forum:
http://forum.processing.org/topic/the-mouse-event-always-be-eaten-one-by-the-menu-button

After the menu button is pressed, the next touch on the screen does not generate a mousePressed() event. (So you have to tap the screen once after turning a menu on or off before it responds normally.)

This happens on a Nexus 7 (android 4.2.something) and on an SG3 (Android 4.1.2), but it does NOT happen on my just-slightly-older Samsung Galaxy Ace iix (Android 4.0.4). So this might be only happening on devices that are 4.1 and higher. (But I've only tested on these three devices so far.)

Edit: It's not only mousePressed events that disappear. Keypress events can also be lost. eg. After pressing Menu, the next tap of Menu is ignored, and then after that the next whatever will happen normally. Same with the back button after pressing Menu.

Ability to use newer API

According to the Processing Wiki, currently the Android implementation requires the Android API version 10. The most current version is 17.

While trying to build some example sketches to fill in some of the gaps, it appears that functionality has changed considerably over the last 7 revisions - classes and methods have changed or been added, etc. This makes searching forums like Stack Overflow for suggestions about projects difficult, since many of the answers do not work in the older API.

I don't have any clue what's happening under the hood that requires API 10 (if someone can suggest where that would be interesting too), or what it might involve to change that, so apologies if this is an unreasonable or impossible request!

Keyboard doesn't open using MENU button on Nexus (and perhaps other devices)

Having a Nexus tablet and no other Android devices, I can only say that the keyboard does not open when holding the MENU button (the suggested method on the Wiki).

To fix this, I've used the following code:

// use menu button to toggle keyboard
if (key == CODED && keyCode == MENU) {
    // turn on keyboard - via: http://stackoverflow.com/a/2348030
    InputMethodManager inputMgr = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
      inputMgr.toggleSoftInput(0, 0);
}

path to external (non-standard) sketch directory not referenced in build of android tool for processing Edit

  • Export to Android device (run on device) hangs at "Waiting for Device to become available"
  • Export to Emulator (run on emulator) never builds emulator, fails.

from the forum post:
So... I found another reason that you may get caught by this problem. (note Mac OS 10.8.4, Processing 2.0.1)
I have been struggling, struggling, struggling, trying all other proposed solutions. Didn't work. But what did is...

I normally put my sketches in a folder that is not the standard location. Furthermore it is not on the computer's 'home' disk.

I found that when I put the sketches into Processing's expected home directory and reassigning the path in preferences (and without doing any additional installs – I've done everything as said before) the sketch loaded to my external device properly, and also for the first time booted up an emulator (it was never creating one before).
I then reassigned the path to my preferred processing sketch directory on the external drive and it worked building from there too.

So. Processing has an issue with not updating a path somewhere when Android is installed
If you do not use the standard sketch path, you are screwed as something is missing when Processing tries to do the build.
But resetting the path to your preferred sketch folder location after the Android installs fixes this.
Whether it stays fixed is another matter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.