Android安装后没有完成和打开按钮

                    File apkFile = new File(filePath);
                    Intent intent = new Intent();
                    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); //如果不加,最后安装完成,点打开,无法打开新版本应用。
                    intent.setAction(Intent.ACTION_VIEW);
                    intent.setDataAndType(Uri.fromFile(apkFile), "application/vnd.android.package-archive");
                    startActivity(intent);
                    android.os.Process.killProcess(android.os.Process.myPid()); //如果不加,最后不会提示完成、打开。
原文地址:https://www.cnblogs.com/feijian/p/6249211.html