title: how to continue recording to the same audio file through different pages using phonegap?
body: <p>I need my <strong>phonegap</strong> app to have audio recording in the background while its working. For that, the <code>Media</code> object works just fine, the thing is it stops recording once I'm navigating to a new page. I didn't find any way to pause and continue the recording, and even if possible I'd rather not do that since the recording will be cut. </p>
  
  <p>Do I need to start writing plugins?</p>
  
  <pre><code>function startAudioRec() {
    var src = "rec.amr";
    audioRec = new Media(src, recordOnSuccess, recordOnError);
    audioRec.startRecord();
    circleBlink();
    console.log("test");
  
  }
  function recordOnError() {}
  function recordOnSuccess() {}
  
  var visible = true;
  var recInterval;
  
  function circleBlink() {
    recInterval = setInterval(blink, 1000);
    function blink() {
      var circle = document.getElementById('recCircle');
      if (visible) {
        circle.setAttribute("style", "visibility: hidden;");
        visible = false;
      } else {
        circle.setAttribute("style", "visibility: visible;");
        visible = true;
      }
    }
  }
  function stopAudioRec() {
    audioRec.stopRecord();
    clearInterval(recInterval);
    document.getElementById("recCircle").setAttribute("style", "visibility: hidden;");
    audioRec.release();
  }
  </code></pre>