Skip to content

churchtools/react-native-ringer-mode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-ringer-mode

Getting started

Install

$ 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

Packages

No packages published

Languages

  • Java 84.6%
  • JavaScript 15.4%