Documentation
¶
Overview ¶
Package mobile exposes the a2ald daemon to Android and iOS via gomobile bind.
Usage from a native shell App:
err := mobile.Start(dataDir) // call once on app launch url := mobile.WebUIAddr() // load in WKWebView / WebView mobile.Stop() // call on app terminate
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
Start launches the a2ald daemon in the background. dataDir is the app-specific writable directory (e.g. from Context.getFilesDir() on Android, or NSDocumentDirectory on iOS). Returns an error if already running or if initialisation fails.
func Stop ¶
func Stop()
Stop shuts down the daemon gracefully. It is safe to call Stop even if the daemon is not running.
func WebUIAddr ¶
func WebUIAddr() string
WebUIAddr returns the full URL of the REST API / Web UI (e.g. "http://127.0.0.1:2121"). Load this in a WebView after Start returns.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.