New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-audio-android

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-audio-android

A simple audio recorder for Android

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

react-native-audio-android

A simple audio recorder for your react native app!

##Installation

npm install react-native-audio-android

Add the following in android/app/build.gradle:

dependencies {
  ...
  compile project(':RNAudioRecorder')
}

Add the following in android/settings.gradle:

include ':RNAudioRecorder', ':app'
project(':RNAudioRecorder').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-audio-android/android')

Edit android/app/src/main/java/.../MainActivity.java to register the native module:

...
import com.frosty92.RNAudioRecorder.RNAudioRecorderPackage; // <-- New
...

public class MainActivity extends ReactActivity {
  ...
  @Override
  protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new RNAudioRecorderPackage() // <-- New
    );
  }

##Usage:

//import the module
let AudioRecorder = require('react-native-audio-android');
let audioRecorder = new AudioRecorder();

//to start recording audio:
       audioRecorder.startAudioRecording((success) => {
          console.log(success);
        }, (error) => {
        console.log(error);
        });
        
        
  //to stop recording audio: 
  
     audioRecorder.stopAudioRecording((result) => console.log(result));
        
        
        



Keywords

react-native

FAQs

Package last updated on 10 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts