Android install apk with Intent
<p>I need to install apk programatically. I find a method to install it with Intent:
<a href="http://stackoverflow.com/questions/6813322/install-uninstall-apks-programmatically-packagemanager-vs-intents">install / uninstall APKs programmatically (PackageManager vs Intents)</a></p>

<pre><code>Intent intent = new Intent(Intent.ACTION_VIEW);
Uri apkUri = Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/Download/" + "app.apk"));
intent.setDataAndType(apkUri, "application/vnd.android.package-archive");
startActivity(intent);
</code></pre>

<p>But, it doesn't work. The problem is the installation activity didn't appear, instead, a list of other programs is displayed for choice:</p>

<p><img src="http://i.stack.imgur.com/TYjp5.jpg" alt="enter image description here"></p>

<p>Could someone tell me what the problem is? Thanks!</p>

<p>Update:</p>

<ol>
<li>The permission <code>android.permission.INSTALL_PACKAGES</code> is included in manifest.</li>
<li>I am running Android version 2.3 SDK 10</li>
</ol>
