Sunday, November 2, 2014

Processing for android - installation

We will install processing for android. Since Processing uses Java, we first install the JDK.
Follow this link to download the JDK Standard Edition.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Install the JDK. Now, we need to add the path of JDK to our system path. Go to the bin folder of the Java installation. It will be located in the following folder.

Copy this path to clipboard. Right click on your computer and select properties.

Select Advanced System Properties.

Select Environment Variables.

Search for the System Variables called Path, select it and click Edit...

Paste the path copied into the clipboard in this location (add a semi colon before it) and click OK.

Now, the underlying system knows where JDK is. We proceed to install Processing.
Go to the following link:
https://www.processing.org/download/?processing

Download the version appropriate for your OS. The latest stable release at this time is 2.2.1 (released on 19 May 2014).
It downloads as a zipped package. Extract the package and copy that into any convenient location. I use my desktop to store the unzipped package.

Next, we need to install the android SDK. This installation has already been briefed in my previous post, except for one minor correction. We don't need to download the entire ADT with Eclipse. Since, we will be using the Processing IDE, we will download the android SDK for an existing IDE.

Use the android SDK manager to install the required API files and related google documentation for your devices's android version. Procedure for installing the API files are given in my blog post as below.
Link to my previous post on setting up ADT.
http://presentingthefuture.blogspot.com/2014/01/android-app-development-what-lured-me.html

Now, we need to copy the Android mode template for Processing software. Click on the below link and save the zip package on your desktop.
https://dl.dropboxusercontent.com/u/5898761/AndroidMode.zip

Unzip the package to Documents/Processing/modes folder.

Next, open Processing software and click on the drop down menu that reads "Java" and select "Android".

Processing asks for the path where android SDK is installed. Select the path to your "android-sdk" folder in the android SDK installation path.


We have successfully installed Processing for android. Type the following snippet and run in emulator to check if the installation works correctly.
Warning: Emulator may take a lot of time to open depending on the configuration of your computer; people with less patience are requested to take a long walk after selecting this option.

Further information on how to run this snippet on a real device or a virtual device can be found on my post as below.

Processing for android - introduction

I'm a big fan of Processing software! The next series of posts are meant to provide comprehensive information about Processing for android.

Processing is a programming language and an integrated development environment (IDE). In fact, Processing was the first open source programming language that was meant for non-programmers to create visual artworks. It was started as a project at MIT by Casey Reas and Ben Fry, under the supervision of John Maeda. It provides tools for developing sketches for android, online applications and desktop applications for major operating systems.
Processing itself is a Java application and runs on the JVM. Because of this fact, it can run as a HTML code on any HTML supported browser or on a local machine such as JVM installed on a desktop or a mobile device running android OS.
Initially created to serve as a software sketchbook and to teach computer programming fundamentals within a visual context, Processing evolved into a development tool for professionals. Today, there are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning, prototyping, and production.

Striking features that made Processing popular are:
·        Free to download and open source
·        Interactive programs with 2D, 3D or PDF output
·        OpenGL integration for accelerated 3D
·        For GNU/Linux, Mac OS X, and Windows
·        Over 100 libraries extend the core software
·        Well documented, with many books available

References:
1.     Programming Interactivity, 2nd Edition, by Joshua Noble