How to build it
The build instructions are very similar to the normal How To Build instructions. Additionally, you will need:
- The Android SDK: http://developer.android.com/sdk/index.html
The url doesn't allow to download Android sdk directly (at least for Linux) but to download Android Studio. Once this last one is downloaded and unzipped, you must run <android_studio_dir>/bin/studio.sh. After some seconds, a gui displays and guides you (just select by default options if you never installed Android Studio) for configuring and downloading components (including SDK). There may be mksdcard error at the end of process. There'll be a directory ~/Android/Sdk
- The Android NDK
Go to▸ ▸ in Android Studio, Android SDK and go to SDK Tools tab, there click on NDK and install it.
We develop on Linux as the host environment. When you have the NDK and SDK, clone the git repo:
git clone git://gerrit.libreoffice.org/core libreoffice cd libreoffice
Create your autogen.input, so that it looks like:
# ARM Android --with-distro=LibreOfficeAndroid # or Android x86 ( preferable if using an AVD Emulator ) --with-distro=LibreOfficeAndroidX86 --with-android-sdk=~/Android/Sdk/ --with-android-ndk=~/Android/Sdk/ndk-bundle/
Configure (and install packages as needed) and build
How to run it
cd android/source make install
This will install the .apk to the default emulator or device.
We appreciate any help with the development - every patch counts :-) If you don't know what to work on, have a look at Android Most Annoying Bugs.
More information about the development can be found in:
- Cross-compiling README: https://cgit.freedesktop.org/libreoffice/core/tree/README.cross
- Android development README: https://cgit.freedesktop.org/libreoffice/core/tree/android/README
If you want to speed-up your development cycle, use the Icecream distributed compiler. Specific instructions how to set it up for cross-compiling LibreOffice on Android are in the Using Icecream to speed up the LibreOffice Android build blog post.
gtktiledviewer is a test app that allows development of the LOK API implementations in LO core without any additional complexity (Android or Online both add complexity).
See the gnome-documents page about how to use the underlying GTK widget with that frontend.
At the moment gtktiledviewer has no testsuite, so here is a checklist to do manual testing if there is some larger rework on it.
Basic feature set:
- Click inside a paragraph. Result: Caret appears at the position where the user clicked.
- Click inside a paragraph, start typing. Result: text appears in the application.
- Click inside a bullet list, type Enter. Result: new bullet is inserted, caret is on the new line.
- Double-click inside a paragraph. Result: entire word is selected, the selection has handles to allow shrinking or growing the selection.
- Drag the shown handles inside the paragraph. Result: the selection grows or shrinks according to the movements.
- Text is selected, type a word. Result: The selected text is deleted, the word is typed in.
- Double-click inside a cell in a table or a spreadsheet. Result: If empty, the entire cell is selected. If any text is there, the closest word is selected. If the handles are dragged outside of the cell boundary, selection turns into a able selection.
- Click on an image. Result: selection rectangle of the image (including handles) appears.
- Drag the image's selection handles. Result: The image is resized, keeping the aspect ratio.
- Click on a text inside a shape. Result: Caret appears inside the shape text.
- Click on the border of a shape. Result: Bounding box of the shape appears as the selection, including handles to manipulate the object.
- Drag a handle of the shape's selection. Result: The shape resizes according to the drag. The resizing does not keep aspect ratio.
- Select text (double-click on a word), trigger Bold action on the toolbar. Result: The selected text will be emboldened.
Features implemented after the TDF-funded project ended:
- Search for something in the document. The search result is highlighted.
- If the document is an Impress one, then if the search result is on a next slide, the viewer switches to that slide automatically and the part selector is updated.
- If the search term is not found, the findbar is updated to say so.
- If nothing is selected, then search starts from the top left corner of the visible area, not from the cursor position.
- Desktop-style selection with the mouse (click somewhere, then drag the mouse to the end position).
- Progress-bar on load.
- Clicking on a hyperlinks opens the URL in a browser.
- Add or remove enough content to/from a Writer document so the number of pages changes. The viewer should update the document size correctly. (E.g. scrollbars.)
- Select Writer text, copy, paste to e.g. abiword: formatting should be preserved, as HTML is used for copying.
- Select Writer shape text, paste to abiword, at least plain text should show up, as it's detected that HTML is not supported.
- Switch Impress slides, type text after the slide change -- text should appear. (Focus does not remain on the part selector widget.)
- Switch Calc sheets, after sheet switch the contents of the new sheet is visible. (Tiles from the old sheet are not kept.)