A react native module to show native toast message, play sound and adjust system volume. Currently it works only on Android.
- Show Toast
- Play sound & Adjust system volume
$ npm install react-native-sound-toast --save
$ react-native link react-native-sound-toast
import RNReactNativeSoundToast from 'react-native-sound-toast';
// TODO: What to do with the module?
RNReactNativeSoundToast;
RNNativeSoundToast.showToastAtCenter("Hello World");
RNNativeSoundToast.playSound("my_sound","wav");
RNNativeSoundToast.increaseSound();
- showToast(message)
- showLongToast(message)
- showShortToast(message)
- showToastAtTop(message)
- showToastAtCenter(message)
First you'll need to add audio files to your project.
Save your sound clip files under the directory android/app/src/main/res/raw. Note that files in this directory must be lowercase and underscored (e.g. my_file_name.wav) and that subdirectories are not supported by Android
- playSound(filename, type)
- increaseSound()
- decreaseSound()
- muteSound()
- unMuteSound()
This library is created for learning purpose, so please don't expect regular maintenance.