Can't get File Descriptor for asset
<p>I need to get a file descriptor for a dae file, so I can get the Start Offset and Length. I have got file descriptors for png files, which work fine. I did this by using this code.</p>

<pre><code>int id = 0;
id = getResources().getIdentifier("duck", "drawable", getPackageName());
mAssetDescriptor = getResources().openRawResourceFd(id);
</code></pre>

<p>Like I said, for my png's this worked fine, for my dae's, however, this did not work, I got the following exception:</p>

<blockquote>
  <p>android.content.res.Resources$NotFoundException:
  File res/drawable/duck.dae from
  drawable resource ID #0x7f020030</p>
</blockquote>

<p>mAssetDescriptor was null.</p>

<p>So I tried to do another way. I put my dae files in the assets folder</p>

<pre><code>mAssetDescriptor = getAssets().openFd("duck.dae");
</code></pre>

<p>This came up with the error </p>

<blockquote>
  <p>This file can not be opened as a file
  descriptor; it is probably compressed.</p>
</blockquote>

<p>What I would like to know, is how I can get the Start Offset and Length of the file without using the getFileDescriptor() and getStartOffset() functions, as it seems I can not use these.</p>

<p>I guess it is also worth nothing the dae files are all under 1mb, with duck.dae which i'm trying to load at the moment at 500k.</p>

<p>Thanks alot for the help</p>

<p>Tom</p>
