Can We Install an APK From a ContentProvider?
<p>I am working on <a href="https://github.com/commonsguy/cwac-updater">a library to allow apps to self-update</a>, for those that are being distributed outside of the Android Market.</p>

<p>My original plan was to include code that would download the APK file to internal storage, and then install it from there via a <code>ContentProvider</code> and a <code>content://</code> <code>Uri</code>. However, when I tried that, the installer system dumped a "Skipping dir: " warning to LogCat and failed to actually install it. Once I switched to downloading the APK to external storage and using a <code>file://</code> <code>Uri</code> with the <code>ACTION_VIEW</code> installer <code>Intent</code>, it worked.</p>

<p>The "Skipping dir:" message seems to be logged by <code>parsePackage()</code> in <code>PackageParser</code>, which seems to assume that it is working with a <code>File</code>. That would suggest that we cannot use <code>content://</code> <code>Uri</code> values.</p>

<p>Has anyone successfully used <code>ACTION_VIEW</code> on a <code>application/vnd.android.package-archive</code> <code>Intent</code> with a <code>content://</code> <code>Uri</code>? If so, was there some specific trick in setting up the <code>ContentProvider</code> that made it work?</p>

<p>Thanks!</p>
