> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/home/psdk-peripherals-snapshot/developer-guide/demo-apps.md).

# Demo apps

The Peripherals SDK ships a standalone example app, `peripherals-scanner-demo-<VERSION>.tar.gz`, demonstrating how to use the scanner: all three scan styles (full-screen, embedded preview, headless/no-preview), single and continuous scanning, a beep-on-scan toggle, aimer button control, and the red light filter.

The demo is packaged with each release alongside the SDK artifact. Download it from your version's entry on the [Release Notes](/home/psdk-peripherals-snapshot/release-notes/release-notes.md) page, along with its `.sha256` checksum file where one is listed.

## Prerequisites

* JDK 17+
* Android SDK with `platforms;android-36` and `build-tools;35.0.0`
* ADB on `PATH`

## Getting started

{% stepper %}
{% step %}

### Verify and extract

Run from the directory containing the downloaded files, with `VERSION` set to the version you downloaded (e.g. `0.6.0`). If your version lists a `.sha256` file, verify the download first — `OK` means it is intact:

{% tabs %}
{% tab title="Linux" %}

```shell
VERSION=x.y.z
sha256sum -c peripherals-scanner-demo-${VERSION}.tar.gz.sha256
```

{% endtab %}

{% tab title="macOS" %}

```shell
VERSION=x.y.z
shasum -a 256 -c peripherals-scanner-demo-${VERSION}.tar.gz.sha256
```

{% endtab %}

{% tab title="Windows (PowerShell)" %}

```powershell
$VERSION = "x.y.z"
$expected = $null; $actual = $null
$expected = (Get-Content peripherals-scanner-demo-$VERSION.tar.gz.sha256).Split()[0]
$actual = (Get-FileHash -Algorithm SHA256 peripherals-scanner-demo-$VERSION.tar.gz).Hash
if ($expected -and $actual -and $actual -eq $expected) { "OK" } else { "FAILED" }
```

{% endtab %}
{% endtabs %}

If this reports `FAILED`, download the file again; contact Verifone support if it keeps failing.

Then extract:

```shell
VERSION=x.y.z
tar -xzf peripherals-scanner-demo-${VERSION}.tar.gz
cd peripherals-scanner-demo-${VERSION}
```

The tarball is a self-contained Gradle project.
{% endstep %}

{% step %}

### Resolve the library

The build resolves `com.verifone.psdk:peripherals-scanner` from a Maven repository. Use one of the options below:

{% tabs %}
{% tab title="Maven Local" %}
Follow the **Local Maven** option on the [Installation](/home/psdk-peripherals-snapshot/developer-guide/installation.md) page to extract the SDK Maven repository tarball into `~/.m2/repository/`.

{% hint style="info" %}
`mavenLocal()` is already configured in the demo's `settings.gradle.kts`. No further setup needed.
{% endhint %}
{% endtab %}

{% tab title="Remote Maven" %}
Add the repository URL to `~/.gradle/gradle.properties`:

```properties
MAVEN_REPO_URL=https://maven.example.com/repository/releases
MAVEN_REPO_USERNAME=...
MAVEN_REPO_PASSWORD=...
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Build

```shell
./gradlew assembleDebug
```

The APK is written to `build/outputs/apk/debug/`.
{% endstep %}

{% step %}

### Install

```shell
adb install build/outputs/apk/debug/scanner-demo-debug.apk
```

{% endstep %}
{% endstepper %}

## Upgrading the library version

The demo pins its library version in `gradle.properties` as `peripheralsVersion`. Edit the value to track a different SDK release.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/home/psdk-peripherals-snapshot/developer-guide/demo-apps.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
