Open Image from assets using external program
<p>I've wrote content provider to open a png file in my app package with an external application (standard image viewer of Android). Image is stored in asset folder.</p>

<p>I cannot understand where is a problem, but it doesn't work for me.</p>

<p>openFile of ContentProvider:</p>

<pre><code>   @Override
   public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
       URI file_uri = URI.create("file:///data/data/com.package/assets/image.png"); 
       File file = new File(file_uri.getPath());
       ParcelFileDescriptor parcel = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
       return parcel;
   }
</code></pre>

<p>Starting activity:</p>

<pre><code>Uri uri = Uri.parse("file:///android_asset/image.png"); 
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri, "image/*");
startActivity(intent);
</code></pre>

<p>Is this approach correct and where is my mistake? Or am I totally wrong?</p>
