You can try and do this programmatically, uninstall in the options menu or so, but the user still has to confirm the installation and uninstallation of everyting. I have not personally tested the uninstall part, But it looks like it can work for you.
By doind it programmatically, remove all the files and folders yourself and run the intent for the user to do the rest
Install APK using Intent:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(apkUri, "application/vnd.android.package-archive");
startActivity(intent);
Uninstall APK using Intent:
Intent intent = new Intent(Intent.ACTION_DELETE, Uri.fromParts("package",
getPackageManager().getPackageArchiveInfo(apkUri.getPath(), 0).packageName,null));
startActivity(intent);
I hope you work something out.