I have a problem related to this. I want to use "Adobe Acrobat" or "Samsung Write on PDF" to edit an existing pdf file from my app. When opened from "Archive" application, files are overwritten but when I use my app they save on a different folder. Any ideas? Thanks
Uri uri = FileProvider.getUriForFile(this, getPackageName() + ".provider", file);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri, ContentResolver.getType(uri));
intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.setFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
startActivity(intent);