In the API version 2.2.0 the signature of the HandPoseListener callbacks has been changed. The onDetected and onMotion callbacks have been merged together to a onDetected callback with a boolean value indicating if the detection is a new one.

Pre version 2.2.0 HandPoseListener#onDetected

public void onDetected(HandPoseEvent handPoseEvent) {
  // ... new detection handling code
}

should be changed into

public void onDetected(HandPoseEvent handPoseEvent, boolean newDetection) {
  if (newDetection) {
    // ... new detection handling code
  }
}