title: Install apk without downloading
body: <p>Can I install <code>apk</code> file without downloading? The <code>apk</code> file is on the server. I tried the code below but it doesn't work:</p>
  
  <pre><code>public static void InstallProgram(Uri uri, Context context){
      Intent intent = new Intent(Intent.ACTION_VIEW);           
      intent.setDataAndType(uri,"application/vnd.android.package-archive");
      intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);     
      context.startActivity(intent);
  }
  </code></pre>
  
  <p>Where <code>uri</code> is <code>http://192.168.43.1:6789/mobile_base/test.apk</code>.
  It returns an error:</p>
  
  <pre><code>android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=http://192.168.43.1:6789/mobile_base/test.apk typ=application/vnd.android.package-archive flg=0x10000000 }
  </code></pre>