Hello,
Thanks for your prompt feedback.
This is not actually an issue, but an intentional design by Google.
Since Android 11, Google needs to provide a URI virtual path through FileProvider
instead of the actual path in the file system when reading files for security reasons. Therefore, after you open this resource to an external application through Intent, the external application actually only obtains the content of the file, but does not know its storage location. This is why you need to choose to save it to a new path when saving a file.
Once you need to provide files to external applications, this situation is unavoidable. Since changing office documents is a very complex requirement and involves document security issues.
On the Android native platform, if you need to change the document content directly, you need to first implement a document editor in the application to control the save path. On the native platform, this function is usually implemented by the POI library. This is a large library with a capacity of more than 100mb. If your only requirement is to change office documents, integrating a large class library will increase a lot of overhead.
If you need to integrate native libraries, you can refer to the following official blog.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.