I am developing an Android app from which I want to launch MS office apps to view and edit office files. For example, open a docx stored locally in the device for editing in MS-Word mobile app.
Previously we were opening such file with a file URI passed in an intent with e.g. the "com.microsoft.office.word" package name. The file would open in Word for Android and the user could edit it and save it. No problem.
Now we had to change so that we use the FileProvider class of Android with the permissions for reading and writing. With this implementation other apps can edit the files but Microsoft Office apps for Android are opened in read-only mode with no option to change it.
This seem to be a common issue that happens to others too, as seen in other stackoverflow questions:
and
Xamarin.Forms Android FileProvider: GrantWriteUriPermission not always working
I have also found this link with information about how to invoke the office apps in msdn, but it seems quite incomplete and I haven't been able to make it work with an intent and a local file (I just don't know how to send the ms-word:ofe|u|file so that it recognizes it, it always complains it cannot find the file).
Does anyone know a way to open a local file in edit mode from an android app in microsoft office for Android using FileProvider?
I haven't posted any code as it is no issue with it. Any other app works fine, but Microsoft Office apps.