Skip to content

Notifications, App Links & faults

olef v3.18.0View Markdown

Outcome: test the real-world edges where Android apps actually break—notifications, deep-link routing, split APKs, poor connectivity, process death, GPS changes, and folding screens.

Trigger a chat notification, reply to it inline using Olef without echoing the
reply text in logs, open the resulting deep link, and verify the conversation
survives process death via `olef fault inject`.

Notifications are often the entry point to a user flow. Listing and waiting run from the host scoped to --app:

Terminal window
olef device notifications list --app com.example.app
olef device notifications wait --app com.example.app --timeout-ms 10000

To dismiss a notification or tap one of its actions—including RemoteInput inline replies with secret-safe environment variable input—Olef lazily enables its NotificationListenerService and revokes it automatically on olef disconnect:

Terminal window
export REPLY_TEXT="On my way!"
olef device notifications action --app com.example.app \
--key "<notification-key>" --action "Reply" --reply-env REPLY_TEXT
Section titled “2. Inspect APKs, split installs, App Links & intents”

Check the built artifact offline before installing it, stream split APKs, verify Android App Links domain state, and launch typed intents:

Terminal window
olef app inspect app/build/outputs/apk/debug/app-debug.apk
olef app install base.apk config.arm64_v8a.apk --inherit-unchanged
olef app applinks --app com.example.app
olef app resolve-intent --action android.intent.action.VIEW --data "https://example.com/item/42"
olef app open-intent --action android.intent.action.VIEW --data "https://example.com/item/42" --expect-front

Use --extra-str-env to pass sensitive string extras without writing them into command logs or JSON output.

List all supported fault kinds (one-off actions vs. stateful faults undone by fault clear):

Terminal window
olef fault kinds

Exercise process death, airplane mode, GPS location changes (emulator), or foldable device posture transitions:

Terminal window
olef fault inject process-death --app com.example.app
olef fault inject location --lat 37.7749 --lon -122.4194
olef fault inject posture --state half-opened
olef fault list
olef fault clear --all

For multi-step chaos checks, olef fault run <scenario.json> executes commands, faults, waits, and assertions—and guarantees every injected fault is cleared when the run exits, pass or fail.

  • fault inject location is emulator-only; fault inject posture requires a device or emulator advertising multiple hinge states.
  • app inspect requires aapt2 (part of Android SDK Build-Tools).

See olef device, olef app, and olef fault.