Skip to content

Instantly share code, notes, and snippets.

@tomjuggler
Last active June 7, 2017 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomjuggler/de994c48e4f7790a3c22b204c58c35b9 to your computer and use it in GitHub Desktop.
Save tomjuggler/de994c48e4f7790a3c22b204c58c35b9 to your computer and use it in GitHub Desktop.
Proof that Android is Linux
// I was trying to see if I could get different code to run when the program was executing on Android as opposed to on my Linux Desktop
// came across this..
//paste into Processing for Android (tested on 2.2.1 only)
String OS = null;
String message = "";
void setup(){
size(displayWidth, displayHeight);
OS = System.getProperty("os.name");
message = "OS is: " + OS;
println(message);
}
void draw(){
background(0);
textSize(30);
text(message, 10, height/2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment