Skip to content

digitaldoggo/nativescript-ringer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NativeScript Ringer Plugin

A plugin for controlling the ringer volume and mode in NativeScript Android apps.

Installation

Run the following command from the root of your project:

$ tns plugin add nativescript-ringer

Usage

To use the ringer module you must first import it:

import { ringer } from "nativescript-ringer";

After you have a reference to the module you can make calls to its methods like in the examples below.

Increase Volume:

ringer.increaseVolume();

Decrease Volume:

ringer.decreaseVolume();

Set Volume to a specific value (0-6):

ringer.setVolume(6);

Mute Volume:

ringer.mute();

UnMute Volume:

ringer.unmute();

Toggle Mute:

ringer.toggleMute();

Set Ringer Mode to ("silent", "vibrate", or "normal"):

ringer.setMode("vibrate");

Get Current Ringer Mode. (returns "silent", "vibrate", or "normal"):

ringer.getMode();

About

A NativeScript Plugin for controlling the ringer volume and mode in NativeScript Android apps.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •