Tested on Nexus 7 running Android 4.4 using QuickOffice 6.2.5.310b.
I have implemented a Storage Access Framework DocumentsProvider in my app, which now allows me to open and edit one of my app's files from QuickOffice. I would also like to be able to open and edit a file from within my app when I choose Open With, then choose QuickOffice. Is this possible?
In my app, when I click Open With on a file, I use ACTION_VIEW to open the file in another app. When I select QuickOffice, openFile() is invoked on my content provider with mode = "r". The file is opened in QuickOffice; however, the Save option is disabled, only Save as is enabled. I tried using ACTION_EDIT instead, but my content provider is still invoked with mode = "r" and Save is still disabled.
When I click Open from Google Drive or Open with from Box, the Save option is enabled.
Do I have to use a different action to open the file or change my content provider?
Are you including
Document.FLAG_SUPPORTS_WRITE
inDocument.COLUMN_FLAGS
? Apps may use that to determine if writing is supported before actually trying to open with "w" mode.