Code example for GestureLibrary

Methods: recognize

0
  
  OnGesturePerformedListener gesturePerformedListener= new OnGesturePerformedListener(){
  
 public void onGesturePerformed(GestureOverlayView view, Gesture gesture) { 
  // TODO Auto-generated method stub 
  ArrayList<Prediction> prediction = gestureLibrary.recognize(gesture); 
    if(prediction.size() > 0){ 
    	String gesture_found = prediction.get(0).name; 
    	Log.d("gesture tag", "gesture detected"); 
    	//Toast.makeText(GestureMonitorActivity.this, gesture_found, Toast.LENGTH_SHORT).show(); 
 
    	Intent intent= new Intent(); 
    	intent.putExtra("gesture",gesture_found); 
    	setResult(RESULT_OK,intent); 
    	finish(); 
    	 
      } 
   
  }}; 
}