Processing for Android

EN ES

Almost all of the Processing API can be used in the Android mode. There is a number of new functions and constants that are unique to the Android mode in version 4.0+, specially relevant to wallpapers, watch faces, and VR apps.

Environment

displayDensity
orientation()
getActivity()
getContext()
getFragmentManager()
getWindow()


System events

backPressed()


Permissions

hasPermission()
requestPermission()


Multitouch

matriz de toques
touchEnded()
touchMoved()
touchStarted()


Keyboard

closeKeyboard()
openKeyboard()


Live Wallpapers

wallpaperHomeCount()
wallpaperOffset()
wallpaperPreview()


Watch Faces

wearAmbient()
wearBurnIn()
wearInsets()
wearInteractive()
wearLowBit()
wearRound()
wearSquare()


Virtual Reality

STEREO
MONO
calculate()
cameraUp()
eye()
getEyeMatrix()
getObjectMatrix()


Android API

The PApplet class in the Android mode exposes some functions from the underlying Android API to make easier to receive notifications from the system:

onActivityResult()
onNewIntent()

The Fragment API for adding menu items to the App Bar is also available through PApplet:

onCreateOptionsMenu()
onOptionsItemSelected()
onCreateContextMenu()
onContextItemSelected()
setHasOptionsMenu()