title: Install APK from Internal Memory
body: <p>I know this question has been asked many times before, but none of the solutions solved my issue.
  I have an APK saved on internal memory: "/data/data/[package-name]/files/0.apk"
  I saved it using:</p>
  
  <pre><code>openFileOutput("0.apk", Context.MODE_WORLD_READABLE);
  </code></pre>
  
  <p>I want to install it using the following code, but I am getting "There was a problem parsing the package"</p>
  
  <pre><code>Intent intent = new Intent(Intent.ACTION_VIEW);
  intent.setDataAndType(Uri.fromFile(new File(context.getFilesDir(), "0.apk")), "application/vnd.android.package-archive");
  context.startActivity(intent);
  </code></pre>
  
  <p>And LogCat says, "Parse error when parsing manifest. Discontinuing installation". Please help me solve this problem.</p>
  
  <p>Edit:
  I decided to use external storage for my file. When I copied my file to the sd card and tried to install it by the above code, everything was alright. But when I downloaded the apk and stored it on sd card, the same "Parse error..." showed up again. At first, I assumed that it's because of a corrupted apk, but when I tried to install it outside my app, it worked.</p>