Android: How to retrieve file name and extension of a resource by resource ID
<p>I have the following:</p>

<pre><code>getResources().getResourceEntryName(resourceId);
</code></pre>

<p>The problem is, that it retrieves only the file name without the extension.</p>

<p>For example, if I have the following res/drawable/pic.jpg, the</p>

<pre><code>getResources().getResourceEntryName(resourceId);
</code></pre>

<p>is returning the value "pic". The extension .jpg is missing.</p>
