title: IsLocationOnPath not working
body: <p>I am working to make a check in my app that whether user follow given route map or not. I am checking user change in current position and have called isLocationOnPath in my location changed method as following</p>
  
  <pre><code> try {
              final Runnable r = new Runnable() {
                  public void run() {
                      if (handelrCheck) {
                          if (visitedPoints.size() != allQuestions.size() &amp;&amp; QuestionOnTheRoute() &lt; mCircle.getRadius() &amp;&amp; !isDone() &amp;&amp; Integer.parseInt(allQuestions.get(questionNumber).getSequence())==sequenceFlag) {
                              visitedPoints.add(new LatLng(Double.parseDouble(allQuestions.get(questionNumber).getLat()), Double.parseDouble(allQuestions.get(questionNumber).getLng())));
                              showPopup(); // show question pop up when it is inside user radius
                              //add viisited check point to menu
                              VisitedcheckPoint++;
                              sequenceFlag++;
                              heading5.add("" + VisitedcheckPoint);
                              for (int i = 0; i &lt; heading5.size(); i++) {
                                  if (heading5.size() &gt; 1) {
                                      heading5.remove(0);
                                  }
                              }
                          }
  
                          else if (checkCompleteSurvey()&lt;mCircle.getRadius()) { // when user complete survey
                              handelrCheck = false;
                              handlerForQuestions = null;
                              showAllAnswers(); // show all ansers to user when user complete survey
  
                          }
                          else if(!PolyUtil.isLocationOnPath(new    LatLng(AppPreferences.getLatitude(mCurrentActivity),AppPreferences.getLongitude(   mCurrentActivity)),routePoints,true,10)){
                              Toast.makeText(mCurrentActivity, "Please follow the selected route for experiment", Toast.LENGTH_SHORT).show();
                          }
  
      //                        else if (visitedPoints.size() ==    databaseHandler.getQuestionOnRoute().size()) { // when user complete survey
      //                            handelrCheck = false;
      //                            handlerForQuestions = null;
      //                            showAllAnswers(); // show all ansers to user    when user complete survey
      //
      //                        }
                      }
  
                      if (handlerForQuestions != null)
                          handlerForQuestions.postDelayed(this, pooltime);
                  }
  
              };
  
              handlerForQuestions.postDelayed(r, pooltime);
          } catch (Exception e) {
              e.printStackTrace();
          }
  </code></pre>