Just follow these steps:
1, Download the file using Asynctask or Service. Solution here
2. Transfer the downloaded file to the package installer.
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + "app.apk")), "application/vnd.android.package-archive");
startActivity(intent);
mime. . . ,