Implementing sound on in the project

i want to play a sound in my project so that if an event happens the app will call the sound to play. eg. if Bluetooth connection is establish the "connected" sound will play

Too easy

Capture
Import your sound in the 'Media Drawer'.

Drag a sound component and change the source to your sound
Capture2

component_method


Please search the community before posting!


Please do not worry about '*.ttf'

You will need to find a source to download the connection sound and upload it in the Media drawer. Only use .WAV or .MP3.

image

Drag out a BluetoothClient (Connectivity) and Player (Media) component.

Then, set the 'Source' of the Player to the connection sound.

image

Use these as the blocks (draggable, directly drag them to your workspace).

blocks (3)

why not use the sound component?

1 Like

Actually, it really doesn't matter. The Player component is more efficient to play long sounds, we do not know how long the user's sound is.

1 Like