title: Find count of particular text in webview in android
body: <p>I need to find particular text in webview but i can not able to do it.
  findall is deprecated  after api level 16 and we need to use findAllAsync.
  we can also use WebView.FindListener.
  Earlier i was used findall and it work fine but it not work in kitkat and lollipop. I have tried with findAllAsync but i can not able to find count of any particular text.
  my code is here :</p>
  
  <pre><code>@Override
  public void onFindResultReceived(int activeMatchOrdinal,
          int numberOfMatches, boolean isDoneCounting) {
      if (isDoneCounting) {
          updateMatchCount(activeMatchOrdinal, numberOfMatches,
                  numberOfMatches == 0);
  
      }
      Log.e("test", "data ::" + numberOfMatches);
  
  }
  
  public void findAll() {
      if (webviewdevelopment == null) {
          throw new AssertionError(
                  "No WebView for FindActionModeCallback::findAll");
      }
      CharSequence find = "Following";
      if (0 == find.length()) {
          webviewdevelopment.clearMatches();
          mMatchesFound = false;
          webviewdevelopment.findAll(null);
      } else {
          mMatchesFound = true;
          mNumberOfMatches = 0;
          webviewdevelopment.findAllAsync(find.toString());
  
      }
  
      Log.e("test", "data ::" + mNumberOfMatches);
  
  }
  
  public void updateMatchCount(int matchIndex, int matchCount,
          boolean isEmptyFind) {
      if (!isEmptyFind) {
          mNumberOfMatches = matchCount;
          mActiveMatchIndex = matchIndex;
          updateMatchesString();
      } else {
  
          mNumberOfMatches = 0;
      }
  }
  
  private void updateMatchesString() {
      if (mNumberOfMatches == 0) {
  
      } else {
  
          Log.e("test", "data ::" + mNumberOfMatches + ","
                  + mActiveMatchIndex + 1 + "," + mNumberOfMatches);
  
      }
  
  }
  
  private void findNext(boolean next) {
      if (webviewdevelopment == null) {
          throw new AssertionError(
                  "No WebView for FindActionModeCallback::findNext");
      }
      if (!mMatchesFound) {
          findAll();
          return;
      }
      if (0 == mNumberOfMatches) {
          // There are no matches, so moving to the next match will not do
          // anything.
          return;
      }
      webviewdevelopment.findNext(next);
      updateMatchesString();
  }
  
  @Override
  public void onFindResultReceived(int activeMatchOrdinal,
          int numberOfMatches, boolean isDoneCounting) {
      if (isDoneCounting) {
          updateMatchCount(activeMatchOrdinal, numberOfMatches,
                  numberOfMatches == 0);
  
      }
      Log.e("test", "data ::" + numberOfMatches);
  
  }
  </code></pre>
  
  <p>anybody have any demo please provide me, thanks</p>