Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: M0N3/react-native-audio
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: moonvalleysoftware/react-native-audio
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 9 commits
  • 2 files changed
  • 1 contributor

Commits on Dec 21, 2017

  1. Copy the full SHA
    ec42b5f View commit details
  2. Merge pull request jsierles#1 from moonvalleysoftware/Add-measurement…

    …Mode-to-android
    
    Add measurement mode to android
    hubConnect authored Dec 21, 2017
    Copy the full SHA
    84322f1 View commit details
  3. Activity method

    hubConnect committed Dec 21, 2017
    Copy the full SHA
    9c6a636 View commit details
  4. Copy the full SHA
    524b18f View commit details
  5. Copy the full SHA
    7d3d550 View commit details
  6. Constants values

    hubConnect committed Dec 21, 2017
    Copy the full SHA
    f52ecff View commit details
  7. Testing

    hubConnect committed Dec 21, 2017
    Copy the full SHA
    8027f9f View commit details
  8. API 24 things removed

    hubConnect committed Dec 21, 2017
    Copy the full SHA
    61ed964 View commit details
  9. Merge pull request jsierles#2 from moonvalleysoftware/Android-measure…

    …mentmode
    
    Android measurementmode
    hubConnect authored Dec 21, 2017
    Copy the full SHA
    e9262d9 View commit details
Showing with 10 additions and 2 deletions.
  1. +9 −1 android/src/main/java/com/rnim/rn/audio/AudioRecorderManager.java
  2. +1 −1 android/src/main/java/com/rnim/rn/audio/ReactNativeAudioPackage.java
Original file line number Diff line number Diff line change
@@ -49,11 +49,13 @@ class AudioRecorderManager extends ReactContextBaseJavaModule {
private boolean meteringEnabled = false;
private Timer timer;
private int recorderSecondsElapsed;

private boolean measurementMode = false;

public AudioRecorderManager(ReactApplicationContext reactContext) {
super(reactContext);
this.context = reactContext;


}

@Override
@@ -100,6 +102,12 @@ public void prepareRecordingAtPath(String recordingPath, ReadableMap recordingSe
recorder.setAudioEncodingBitRate(recordingSettings.getInt("AudioEncodingBitRate"));
recorder.setOutputFile(recordingPath);
meteringEnabled = recordingSettings.getBoolean("MeteringEnabled");
measurementMode = recordingSettings.getBoolean("MeasurementMode");
if(measurementMode) {
//VOICE_RECOGNITION
recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_RECOGNITION);

}
}
catch(final Exception e) {
logAndRejectPromise(promise, "COULDNT_CONFIGURE_MEDIA_RECORDER" , "Make sure you've added RECORD_AUDIO permission to your AndroidManifest.xml file "+e.getMessage());
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ public List<NativeModule> createNativeModules(ReactApplicationContext reactConte
* listed here. Also listing a native module here doesn't imply that the JS implementation of it
* will be automatically included in the JS bundle.
*/
@Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}