title: How to get file URI when opening file with intent.action.VIEW?
body: <p>User click on <em>.txt</em> file in file explorer and get dialog "Open with..." and there is listed my app.
  When I try to open file I want to get its absolute path. All I get is content:// URI</p>
  
  <p><code>I/ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.providers.downloads.documents/document/1031 typ=text/plain</code></p>
  
  <p>If I want to retrieve path to my file I need to get file:// URI. How can I get only <code>file://</code> URI instead of <code>content://</code> ?</p>
  
  <p>Here is AndroidManifest</p>
  
  <pre><code>        &lt;intent-filter &gt;
              &lt;action android:name="android.intent.action.VIEW" /&gt;
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;    
              &lt;data android:mimeType="text/*"/&gt;
          &lt;/intent-filter&gt;
  </code></pre>
  
  <p>Here is how I try to handle file:</p>
  
  <pre><code>Intent i = getIntent();
  String action = i.getAction();
  String type = i.getType();
  
  if (Intent.ACTION_VIEW.equals(action) &amp;&amp; type != null) {
      Uri uri = i.getData();
      if (uri != null) {
          Toast.makeText(this, uri.toString(), Toast.LENGTH_SHORT).show();
      }                 
  }
  </code></pre>