Code example for GestureLibrary

Methods: recognize

0
 
	public void onGesturePerformed(GestureOverlayView overlay, Gesture gesture)
	{ 
 
		/* Creates an arraylist of different suggestions for recognitions */ 
		ArrayList<Prediction> predictions = mLibrary.recognize(gesture);
 
		/* 
		 * Sometimes the API doesn't find a thing. In that case, the app skips 
		 * this block. 
		 */ 
		if (predictions.size() > 0)
		{ 
			/* 
			 * Gets the first prediction and checks its score. If it's low, 
			 * skips the next block. 
			 */ 
			Prediction prediction = predictions.get(0);
			if (prediction.score > 1.0)
			{