Can we add to the android processing reference?

As the title implies is there any way to submit code to the processing android reference. The current reference is a bit light and I feel it might be good if more examples were added.

1 Like

Absolutely! As you may have seen, I’ve put some sample code together on this repo because I noticed that many “IoT makers” do not use Processing for Android together with the Arduino IDE (which were born to live together); P4A has totally lost the battle against software like “MIT App Inventor” because it seems more simple. And that is really a pity.
It would be really nice to have a good Wiki, but English isn’t even my second language, so I don’t feel up to that task.

That would be awesome and I feel like processing actually makes things easier when combined with all the libraries and tools they provide, especially when compared to android studio. I have a fair bit of time at the moment, and would be happy to contribute in some way providing that someone can guide me through the requirements as this is my first time.

1 Like

I’m using a Mac. When I download the repo (which I think is a great idea) I see the following. None of these executables run and I’m not sure why this happens:

Do the examples provided on the A4P work normally?
What Android version name has your device?
I just bought an Android 10 phone, and am rewriting the codes to adapt them for the newest versions.
I uploaded a new code for the Image Explorer today.
I also tested the first row of sketches above, and they work.
Are you using the app APDE or the P4A IDE?
And testing via USB on real device or simulator?

@noel I’m sorry but I am unable to answer any of your questions because I can’t open any of the files using Processing IDE 3.5.4; they are all grayed out in the Mac finder. On a Mac there’s only one thing you can do with an executable file and that’s to double click on it. If it is a legit executable then it will run. I am totally perplexed why the macOS turns Java/Android files into executable files; the same thing has happened (rarely) on other files and I have never understood why it does that. Mainly I just want to inform you that that has happened on my system. If anyone else is using macOS perhaps they can see what happens to the demo files on their systems. I would probably be able to open a simple text file and copy/paste the source code into Processing IDE to run.

You can always use the app APDE available on Play Store, to develop your Android Processing apps.

@noel. I already have APDE; there’s more to it than that. FWIW one of the files in the repo folder is called ‘’ and when I expand it I see a folder which contains project files that I can run. Files with the .pde extension open into Processing as expected.

I’ll see if I can get a hold of an apple pc to test this. It would be great to also include apple users.

The contains the oscP5 lib to be unzipped into the APDE’s libraries folder.
It’s a lib I modified to let it work also on APDE.
See here a communication sample sketch between PC and phone.

I am able to copy/paste the source code for each example into Processing and get them to run for the most part ( unable to run videoPlayer and edit text box so far ); it’s only when I select Code/Download zip that I get a folder full of executable files. I have some code for a drop down list that I would be willing to donate for consideration for inclusion into the repo (if it’s good enough); is there a process for submission?

Yes, until recently I had only a Kitkat 4.4 and a Lollipop 5.1 device to my disposal, to test the codes. I’m testing and rewriting all with an Android 10 device now. I just added a new Edit text code written by @uheinema for you to test. The video player I’m working on. If you want to share code on the repo, I happily will place it, with the credit to your name like I did with the text edit mentioned above. Just post it here or send a message.

I just realized the problem. I need to add an extension pde to each file. I’ll do that. Thanks for pointing that out.

@noel One of the demos I had a problem with was edit text box. The error msg concerned lerpColor(). I changed from color c = lerpColor(c1, c2, inter); to lerpColor(c1, c2, inter, c); where c is initialized like this:color c = color(0); Apparently the call has been changed to require four parameters instead of three, ie lerpColor(int, int, float, int) and the last parameter is the return color. However, I could find no documentation of this on the internet. Nonetheless, it ran ok after I made this change.