react-native-ringer-mode-wxl

0.0.1 • Public • Published

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

Package Sidebar

Install

npm i react-native-ringer-mode-wxl

Weekly Downloads

2

Version

0.0.1

License

GPL

Unpacked Size

4.31 MB

Total Files

1306

Last publish

Collaborators

  • xianliang