0.0.1 • Published 4 years ago

react-native-ringer-mode-wxl v0.0.1

Weekly downloads
1
License
GPL
Repository
github
Last release
4 years ago

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)
});

Example code