Cannot run sketch on old Android kitkat device, using Processing 4 IDE

From Wikipedia, the free encyclopedia

Android KitKat Version of the Android operating system
200x124
250x444

Android 4.4.2 KitKat running on a Nexus 5
Developer Google
Released to
manufacturing
September 3, 2013; 11 years ago
General
availability
October 31, 2013; 11 years ago (as Android 4.4) June 25, 2014; 10 years ago (with Wearable Extensions)
Final release 4.4.4_r2.0.1 (KTU84Q)[1] / July 7, 2014; 10 years ago
Kernel type Monolithic (Linux)
Preceded by Android 4.3.1 “Jelly Bean”
Succeeded by Android 5.0 “Lollipop”
Official website www.android.com/versions/kit-kat-4-4/ Edit this at Wikidata10x10
Support status
Unsupported since October 2017
Google Play Services support dropped since August 10, 2023

Android KitKat is the codename for the eleventh Android mobile operating system, representing release version 4.4. Unveiled on September 3, 2013, KitKat focused primarily on optimizing the operating system for improved performance on entry-level devices with limited resources. On July 24, 2023, Google announced that Google Play Services would no longer support KitKat in August of that year.[2][3][4] The first phone with Android KitKat was the Nexus 5.

As of January 2025, 0.12% of Android devices run KitKat.[5]

For whatever it’s worth, I just dug out my old Nexus 4 (which I believe is older than your device) and got this demo to run using the AndroidMode published on github referenced above. I also used Processing IDE version 4.3 since Android Mode seems to be broken in the recent 4.4.1.

void setup() {
  fullScreen();
  background(209);
  fill(255, 255, 0);
  rect(200,200,400,400);
}

void draw() {  
}

It’s really tricky, you have to get just the right combination of Processing IDE and AndroidMode version.

@svan
Thank you for still being there. My Note-8 GT-N5110 WiFi is 2013. Android 4.4.2
I have come to the same conclusion that it is a critical combination and that the main criticality is the Android mode.
Are you able to open the Modes/androidMode folder and open the file mode.properties where it gives the version number e.g. 271?
Thanks

The AndroidMode that I referenced to run old apps has a version of 410.

@svan
Thank you for that version number.
I just downloaded the mac intel version Processing 4.3 and the Androidmode 410 from github.
It did ask for the sdk path when I selected Android Mode in the PDE, even though it was correctly on the first line of the preferences.txt. My sdk contains platforms 'android-11; 18, 19, 20, 33, 35.
Can you confirm that the Processing app (4.3) i simply the app and no installation files.

Well, my device has not changed in any way since I last successfully uploaded the game, no extra apps or anything else, except playing the game; yet it simply closes the sketch on arrival using exactly the setup you describe. There were no errors while building.
That seems to only leave the sdk in some way. The original message some days ago at build time said the sdk platforms were not signed (probably because I copied instead of properly using sdkmanager. I went back and did so which corrected that problem.
Baffled unless, as I say it is the sdk.
EDIT: or java install.

Not sure what you mean by ‘installation files’? It’s just what I downloaded some time ago from the Processing.org website.

Are you trying to run a simple demo or the app that you wrote? Using the macBook or M2?

If I tried to run the incorrect AndroidMode on my old Nexus 4 I had the same problem as you; just refuses to run after building ok. As soon as I switched to AndroidMode version 410 (revised) it ran ok.

@svan
Thanks again.
I just wanted to be sure that the Processing 4.3 that I obtained was complete (simply processing.app) and that there are no other files required to install anything. It seems not from your answer.

I am using the macBook (intel); not the M2 (arm).

That includes the exact sketch that you used.

My AndroidMode came from the github below (the only one I know)…
Releases · processing/processing-android (github.com)

I note that you say you switched from the incorrect AndroidMode that had failed; which version? was it a ‘non-revised’ 410?
I ask because I noticed that you also have added “(revised)” to 410.
My AndroidMode ‘mode.properties’ file matches yours and I saw no indication on github of revision.
Was your version from the same github as I just mentioned? If not can you please provide a URL. Perhaps ‘the end is nigh’.
Thank you svan.

@svan
I realise what you mean by ‘revised’, it goes back to your post of 28 Apr. which Processing did not find and insisted I download AndroidMode, which defeated the experiment.
I just tried that version again by placing it in the Mode folder and it again insisted I download AndroidMode. I did so but this time on the second try, I dumped the folder and replaced it with your version. It recognised it and your sketch worked!!!
Thank you so much for that single file lurking on the internet that nobody would ever find without a prompt. I wish I had thought of simply replacing the downloaded androidmode folder the first time. I guess that is how the tortured mind works.
Again thank you, thank you, thank you.

1 Like

@shedMusic
Thank you for all your time and assistance. You should notice that the problem has been solved by [svan] with a modified AndroidMode v410 which works with Processing 4.3 on the intel macBook pro. I expect to try it on the M2 because it has a translation from intel to arm.

@enonod
Great to hear it’s resolved!
I’ll be looking to try and see why this particular set up works!

@shedMusic
It is definitely due to the modified/revised AndroidMode v410 from here…

GitHub - ajavamind/processing-android-410-api-15: Processing-android AndroidMode version 4.5 (version 410) modified for devices using API 15

I transferred everything in a single folder, sdk as well and it worked on the M2 Mini.
wow!

Here is the original forum post concerning this issue. Please check out the github discussion also and the author will explain why the original distributed code did not work:
https://discourse.processing.org/t/androidmode-fails-on-new-galaxy-tab-a8/41742

@svan
Thank you I will study that

@svan

Yes thanks! I keen to know what’s going on :+1: