For the complete documentation index, see llms.txt. This page is also available as Markdown.

Test with the TalkBack Screen Reader

TalkBack is Android's built-in screen reader. Enabling it on an Appetize device lets you verify that your app is accessible.

TalkBack is preinstalled on Appetize Android devices but disabled by default. You enable it for a session by running a few adb commands and turning on audio so you can hear it.

Prerequisites

  • An Android device. TalkBack and adb commands are Android-only.

  • Audio enabled on the session, so you can hear TalkBack speak.

Enable TalkBack

Run the following adb shell commands on the device, in order:

# Remove the Appetize automation helper (it conflicts with TalkBack)
adb shell pm uninstall io.appetize.automations

# Grant TalkBack the runtime permissions it needs
adb shell pm grant com.google.android.marvin.talkback android.permission.POST_NOTIFICATIONS
adb shell pm grant com.google.android.marvin.talkback android.permission.READ_PHONE_STATE

# Set TalkBack as the active accessibility service
adb shell settings put secure enabled_accessibility_services \
  com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService

Running the commands on Appetize

You can run these in three ways, depending on your workflow.

With the JavaScript SDK

Use session.adbShellCommand(). It runs the part after adb shell. Enable audio in the session config so TalkBack is audible:

At session start

Use adbShellCommand when you want TalkBack enabled as soon as the session starts. Since adbShellCommand accepts one shell string, chain the commands together:

With an ADB tunnel

Use an ADB tunnel when you want to run standard adb shell commands from your machine or from Android Studio.

  1. Start the session with audio=true&enableAdb=true.

  2. Connect to the device with the generated ADB command.

  3. Run the commands from the Enable TalkBack section with adb shell ....

This is useful when you already debug sessions through ADB and want the same workflow here.

Live sample

Hear audio output combined with the TalkBack screen reader:

Last updated