Processing for Android

onPermissionsGranted()

This function is called by Processing when all the so-called "dangerous" permissions have been granted by the user on runtime (this happens only when running the app on devices with Android 6 or newer):


void onPermissionsGranted() {
  context = surface.getContext();
    
  locationListener = new MyLocationListener();
  locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);    
}