Processing for Android

hasPermission()

Use this function to check if a permission is granted to perform a specific operation. The permissions are idenfified with the string constants declared in the Manifest.permission package:


void draw() {
  if (hasPermission("android.permission.ACCESS_FINE_LOCATION")) {
    printn("Location is available");
  } else {
    printn("No permission to read location");
  }
}