title: React-native: How to save audio recording files in specific location in application
body: <p>I have created a project to record audio recordings. Now I want to save files into a folder. After that from there I have to store file names in a database. Any idea how to do it?</p>
  
  <pre><code>componentDidMount() {
    AudioRecorder.requestAuthorization().then((isAuthorised) =&gt; {
      this.setState({ hasPermission: isAuthorised });
  
      if (!isAuthorised) return;
  
      this.prepareRecordingPath(this.state.audioPath);
  
      AudioRecorder.onProgress = (data) =&gt; {
        this.setState({currentTime: Math.floor(data.currentTime)});
      };
  
      AudioRecorder.onFinished = (data) =&gt; {
        // Android callback comes in the form of a promise instead.
        if (Platform.OS === 'ios') {
          this._finishRecording(data.status === "OK", data.audioFileURL, data.audioFileSize);
        }
      };
    });
  }
  
  _renderButton(title, onPress, active) {
    var style = (active) ? styles.activeButtonText : styles.buttonText;
  
    return (
      &lt;TouchableHighlight style={styles.button} onPress={onPress}&gt;
        &lt;Text style={style}&gt;
          {title}
        &lt;/Text&gt;
      &lt;/TouchableHighlight&gt;
    );
  }
  
  _renderPauseButton(onPress, active) {
    var style = (active) ? styles.activeButtonText : styles.buttonText;
    var title = this.state.paused ? "RESUME" : "PAUSE";
    return (
      &lt;TouchableHighlight style={styles.button} onPress={onPress}&gt;
        &lt;Text style={style}&gt;
          {title}
        &lt;/Text&gt;
      &lt;/TouchableHighlight&gt;
    );
  }
  
  async _pause() {
    if (!this.state.recording) {
      console.warn('Can\'t pause, not recording!');
      return;
    }
  
    try {
      const filePath = await AudioRecorder.pauseRecording();
      this.setState({paused: true});
    } catch (error) {
      console.error(error);
    }
  }
  
  async _resume() {
    if (!this.state.paused) {
      console.warn('Can\'t resume, not paused!');
      return;
    }
  
    try {
      await AudioRecorder.resumeRecording();
      this.setState({paused: false});
    } catch (error) {
      console.error(error);
    }
  }
  
  async _stop() {
    if (!this.state.recording) {
      console.warn('Can\'t stop, not recording!');
      return;
    }
  
    this.setState({stoppedRecording: true, recording: false, paused: false});
  
    try {
      const filePath = await AudioRecorder.stopRecording();
  
      if (Platform.OS === 'android') {
        this._finishRecording(true, filePath);
      }
      return filePath;
    } catch (error) {
      console.error(error);
    }
  }
  
  async _play() {
    if (this.state.recording) {
      await this._stop();
    }
  
    // These timeouts are a hacky workaround for some issues with react-native-sound.
    // See https://github.com/zmxv/react-native-sound/issues/89.
    setTimeout(() =&gt; {
      var sound = new Sound(this.state.audioPath, '', (error) =&gt; {
        if (error) {
          console.log('failed to load the sound', error);
        }
      });
  
      setTimeout(() =&gt; {
        sound.play((success) =&gt; {
          if (success) {
            console.log('successfully finished playing');
          } else {
            console.log('playback failed due to audio decoding errors');
          }
        });
      }, 100);
    }, 100);
  }
  
  async _record() {
    if (this.state.recording) {
      console.warn('Already recording!');
      return;
    }
  
    if (!this.state.hasPermission) {
      console.warn('Can\'t record, no permission granted!');
      return;
    }
  
    if(this.state.stoppedRecording){
      this.prepareRecordingPath(this.state.audioPath);
    }
  
    this.setState({recording: true, paused: false});
  
    try {
      const filePath = await AudioRecorder.startRecording();
    } catch (error) {
      console.error(error);
    }
  }
  
  _finishRecording(didSucceed, filePath, fileSize) {
    this.setState({ finished: didSucceed });
    console.warn(`Finished recording of duration ${this.state.currentTime} seconds at path: ${filePath} and size of ${fileSize || 0} bytes`);
  }
  </code></pre>
  
  <p>if any one have about this concept share any sample blogs links,i have searched many blogs but am not getting becoz am new to react native.</p>