title: Open a selected file (image, pdf, ...) programmatically from my Android Application?
body: <p>I'm working on an Android application which should be able to open a selected file from a specific folder.</p>
  
  <p>I already tried this, but after selecting which application I want to open it, I got this message:</p>
  
  <blockquote>
    <p>Impossible loading</p>
  </blockquote>
  
  <p>After trying a lot of <a href="https://stackoverflow.com/questions/5383797/open-an-image-using-uri-in-androids-default-gallery-image-viwer">thread 1</a> and <a href="https://stackoverflow.com/questions/2169649/get-pick-an-image-from-androids-built-in-gallery-app-programmatically">thread 2</a>, I use these lines of code to do it:</p>
  
  <pre><code>Intent intent = new Intent();
  intent.setAction(Intent.ACTION_VIEW);
  intent.setDataAndType(Uri.parse("/mnt/sdcard/xxx/xxx/Pictures/xxx.jpg"), "image/*");
  myContext.startActivity(intent);
  </code></pre>
  
  <p>How can I figure this out?</p>