Programatically install .apk file located in /res/raw
<p>I have stored a .apk file for another app in my /res/raw directory and wish to give the user a prompt to install it. Here's my current code:</p>

<pre><code>Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File("android.resource://" + getPackageName() + "/res/raw/myapk.apk")), "application/vnd.android.package-archive");
startActivity(intent);
</code></pre>

<p>However, when the intent runs, I get a Parse error: <code>There is a problem parsing the package.</code></p>

<p>The .apk file is the one created by eclipse in the /bin directory when I run the other application.</p>

<p>How would I accomplish this programmatic local install correctly?</p>
