mobile

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package mobile provides an entry point for gomobile to start the ondict HTTP server on Android.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Complete added in v0.7.0

func Complete(prefix string, limit int) string

Complete returns a JSON array of up to limit completion suggestions for the given prefix, using fuzzy matching. Calls sources.Complete directly without going through the HTTP server.

gomobile-friendly: only primitive types in the signature.

func ConfigureSync added in v0.7.0

func ConfigureSync(baseURL, username, password string) error

ConfigureSync wires up the sync client. Call this once after StartServer (it depends on util.SetPaths having already been called). Empty baseURL, username, or password disables sync (returns no error).

The same *sql.DB instances are shared with the wordbank/history package shims via SetStore so the WebView's writes and the sync client's reads both go through one connection pool — opening separate handles to the same SQLite file is a recipe for write-lock contention and stale reads.

gomobile-friendly: only primitive types in the signature.

func GetCSS added in v0.7.0

func GetCSS() string

GetCSS returns the concatenated CSS for all loaded dictionaries, ready to be injected as a