title: Get path of data directory(android)
body: <p>I am using tesseract ocr in my app. In order to use tesseract i need to use several language files that are located at a directory called - 'tessdata'.</p>
  
  <p>This is my method code:</p>
  
  <pre><code>    public String detectText(Bitmap bitmap) {
      TessBaseAPI tessBaseAPI = new TessBaseAPI();
      String DATA_PATH = Environment.getRootDirectory().getPath() + "/tessdata/";
  
      tessBaseAPI.setDebug(true);
      tessBaseAPI.init(DATA_PATH, "eng"); //Init the Tess with the trained data file, with english language
  
      tessBaseAPI.setImage(bitmap);
  
      String text = tessBaseAPI.getUTF8Text();
  
      tessBaseAPI.end();
  
      return text;
  }
  </code></pre>
  
  <p>I've used many variations of:</p>
  
  <pre><code>String DATA_PATH = Environment.getRootDirectory().getPath() + "/tessdata/";
  </code></pre>
  
  <p>and every time the app fails with "path not found" exception.
  I need a good way to put this directory in the android phone and get the path of it regardless of which phone it is. Right now the 'tessdata' directory can be found at the app root directory.</p>
  
  <p>How can i do that?</p>