ONLYOFFICE for developers: How the mobile integration works
In this article, we’ll tell you about two scenarios of mobile integration between ONLYOFFICE and cloud services such as Seafile and Nextcloud.
Scenario 1: Individual mobile applications & Shared Folder
Integration example: ONLYOFFICE and Seafile
How it works: Users install two mobile applications — ONLYOFFICE Documents and the Seafile app (in our case, for Android). They can edit office documents using ONLYOFFICE app, and all the changes will be automatically synchronized with their Seafile portals.
Technical details: This scenario assumes that files are downloaded from the cloud service application to the synced folder, so the Shared Folder functionality is required. Depending on the format, the mobile device opens a file with the supported application. For example, ONLYOFFICE supports DOCX, XLSX, and PPTX, and if it is selected as the default application for working with these file formats, our app will open such documents in the editor immediately.
On Android devices, ONLYOFFICE app saves the document to the same location after editing so that the file is synchronized back to the integrator’s cloud by their app.
On iOS devices, document opening is done by importing the file into the application directory.
What you should take into consideration: The Shared Folder must be accessible for writing data by ONLYOFFICE mobile app. File locking and collaborating must be resolved in the connector on the integrator’s side.
Scenario 2: Mobile app & integrator’s site WebView
Integration example: ONLYOFFICE and Nextcloud
How it works: Users who already have Nextcloud server, ONLYOFFICE Docs and the integration app installed and configured, can edit and collaborate on documents on iOS or Android devices from the Nextcloud mobile app.
Technical details: In this scenario, the cloud service mobile application generates and opens a link to its site in the WebView* component. This way, the app opens the mobile version of ONLYOFFICE Docs in the browser.
The mentioned link must either contain authorization user data, or pass the authorization cookies in the WebView.
*WebView is an embeddable browser that a native application can use to display web content.
What you should take into consideration: The specifics of how the WebView works in the application. Some events should be handled separately: closing the editor, downloading a file from the editor, inserting a file from disk, printing.