1.1.1 • Published 4 years ago

react-native-audio-jack v1.1.1

Weekly downloads
35
License
-
Repository
-
Last release
4 years ago

react-native-audio-jack

Getting started

$ npm install react-native-audio-jack --save

Mostly automatic installation

$ react-native link react-native-audio-jack

Important Installation Step For Android

The line of code below should be added to AndroidManifest.xml for the audio jack listener to work.

<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

Usage

import AudioJackManager from 'react-native-audio-jack';

// Determine if audio jack is plugged in
AudioJackManager.isPluggedIn().then(isPluggedIn => console.log(isPluggedIn));

// Listener to listen for change in audio jack status
var audioJackListener = AudioJackManager.addListener(({isPluggedIn}) => console.log(isPluggedIn));

// Later on.... (when component unmounts etc)
audioJackListener.remove();
1.1.1

4 years ago

1.1.0

4 years ago

1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

6 years ago