@Override protected GroupResult doInBackground(UUID... params) { FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient(); addLog("Request: Grouping " + params.length + " face(s)"); try { publishProgress("Grouping..."); // Start grouping, params are face IDs. return faceServiceClient.group(params); } catch (Exception e) { addLog(e.getMessage()); publishProgress(e.getMessage()); return null; } }
@Override protected Face[] doInBackground(InputStream... params) { FaceServiceClient faceServiceClient = SampleApp.getFaceServiceClient(); try { publishProgress("Detecting..."); // Start detection. return faceServiceClient.detect( params[0], /* input stream of image to detect */ false, /* whether to analyzes facial landmarks */ false, /* whether to analyzes age */ false, /* whether to analyzes gender */ false); /* whether to analyzes head pose */ } catch (Exception e) { mSucceed = false; publishProgress(e.getMessage()); addLog(e.getMessage()); return null; } }