I want to play short & Basic sounds in react native
like beep etc...
I do not want to add files to my resource app or
how can I do it?
I checked some libraries
But in all of them, I need to give a path to the file or URL for the file
I found a library that does what I wanted
npm install "react-native-a-beep"
//(RN < 0.60) Mostly automatic installation
react-native link react-native-a-beep
//Usage
import RNBeep from 'react-native-a-beep';
//Examples:
<Button onPress={ () => {RNBeep.beep()} } title="Beep Success"></Button>
<Button onPress={ () => {RNBeep.beep(false)} } title="Beep Fail"></Button>
<Button onPress={ () => {RNBeep.PlaySysSound(RNBeep.AndroidSoundIDs.TONE_CDMA_ABBR_ALERT)} } title="Beep Android Custom"></Button>
<Button onPress={ () => {RNBeep.PlaySysSound(41)} } title="Beep Something"></Button>
<Button onPress={ () => {RNBeep.PlaySysSound(RNBeep.iOSSoundIDs.AudioToneBusy)} } title="Beep iOS Custom"></Button>