react-native-ringer-mode-wxl
v0.0.1
Published
React Native getRingerMode, gets the ring mode of the device, Works for Android only.
Downloads
11
Maintainers
Readme
react-native-ringer-mode
Getting started
Install with git
$ npm install react-native-ringer-mode --save
Link
$ react-native link react-native-ringer-mode
Usage
import RingerMode from 'react-native-ringer-mode';
// getRingerMode is a static async function
// resolves the ringer mode as a string of the android device
// "NORMAL" || "SILENT" || "VIBRATE"
// RINGER_MODE_NORMAL, RINGER_MODE_SILENT, RINGER_MODE_VIBRATE
// Get the value like this
var mode = await RingerMode.getRingerMode();
// Another way to use it
RingerMode.getRingerMode()
.then(mode => {
console.log(mode)
});