I have developed application same like playstore and written below code for apk installation, which is not working in Android 10 (Android Q) device users.
File downloadedFile = new File(download.getFile());if (downloadedFile.exists()) {
downloadedFile.setExecutable(false);
downloadedFile.setWritable(false);
downloadedFile.setReadable(true);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(downloadedFile), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);}
Its already published and user unable to install the new version. Kindly suggest the solution for app update in users device without front end code change.