Documentation
¶
Overview ¶
Command android-services is a development example (step 25.12): a Material page with buttons that open a URI and post a notification with an action button, and log what the desktop services answer, so that the device tests can start the actions without taps, read the results and check the notification in dumpsys. It uses the public API and package desktop only and runs on every platform (off Android the services are those of the desktop, or of the web).
GLUTTER_DEMO is a list of words separated by commas; each one runs once, 3 seconds after the start:
open opens https://example.com openbad opens glutter-nothing://x, which no app handles notify shows a notification with the action "Reply" (ID reply) notifyclose shows a notification and closes it 2 seconds later notifyreplace shows a notification, then another one with ReplacesID notifytimeout shows a notification with a Timeout of 3 seconds
The log lines (the default logger's, so "INFO " comes first):
open result uri=<uri> err=<tag or none> notify result id=<n> err=<tag or none> notification action id=<action ID> notification closed reason=<n> close result id=<n> err=<tag or none>
Run it on a device or the emulator with:
go run ./cmd/glutter-android run ./examples/dev/android-services