Petnow LogoPetnow

Sound Guide

Pet attention sound playback using SoundPlayer.


Before starting this guide, complete Basic Usage.

Overview

The UI module includes 6 built-in sounds to attract pets' attention. You can use the SoundPlayer API to encourage pets to look at the camera during capture.

Available Sounds

Complete Sound List

Sound Preview

Click each sound to preview it. Test your pet's reaction!

SoundDescriptionTargetPreview
🥔 bagOfChipsChip bag rustling sound🐕🐱 Both
🥫 openingCanCan opening sound🐕🐱 Both
🍚 pouringFoodFood pouring sound🐕🐱 Both
🥣 shakeFoodFood shaking sound🐕🐱 Both
🧸 squeakyToySqueaky toy sound🐕 Dogs
😽 pspspsSoundPspsps sound🐱 Cats

Basic Usage

1. Play Random Sound

Automatically selects and plays a sound appropriate for the species.

private var selectedStreamSoundId: Int = -1

// Play random sound
selectedStreamSoundId = playSound(SoundType.RANDOM)

2. Play Specific Sound

Directly select and play the desired sound.

private var selectedStreamSoundId: Int = -1

// Can opening sound
selectedStreamSoundId = playSound(SoundType.OPENING_CAN)

3. Stop Sound

private var selectedStreamSoundId: Int = -1

// Stop playing sound
stopSound(selectedStreamSoundId)

On this page