private async void ExecuteFindFacialSimilarFace(UUID[] mFaceIds) { SimilarFace[] faces = null; bool mSucceed = true; mProgressDialog.Show(); AddLog("Request: Find matchPerson similar faces to " + mFaceIds[0].ToString() + " in " + (mFaceIds.Count() - 1) + " face(s)"); try { var faceClient = new FaceClient(); mProgressDialog.SetMessage("Finding Similar Faces..."); SetInfo("Finding Similar Faces..."); UUID[] faceIds = CopyOfRange(mFaceIds, 1, mFaceIds.Count()); faces = await faceClient.FindSimilar( mFaceIds[0], /* The target face ID */ faceIds, /*candidate faces */ 4, /*max number of candidate returned*/ FaceServiceClientFindSimilarMatchMode.MatchFace ); } catch (Java.Lang.Exception e) { mSucceed = false; AddLog(e.Message); } RunOnUiThread(() => { if (mSucceed) { String resultString = "Found " + (faces == null ? "0" : faces.Count().ToString()) + " matchFace similar face" + ((faces != null && faces.Count() != 1) ? "s" : ""); AddLog("Response: Success. " + resultString); AppendInfo((faces == null ? "0" : faces.Count().ToString()) + " matchFace similar face" + ((faces != null && faces.Count() != 1) ? "s" : "")); } // Show the result on screen when verification is done. SetUiAfterFindFacialSimilarFaces(faces); }); }