Here is my code snippet:
`if (this.platform.is('ios')) {
      this.file.createFile(this.file.cacheDirectory, 
this.voiceMediaObj.fileName, true).then(entry => {
        this.voiceMediaObj.vocieMediaFile = this.media.create(entry.toURL());
      });
    } else if (this.platform.is('android')) {
      this.voiceMediaObj.vocieMediaFile = 
this.media.create(this.voiceMediaObj.vocieMediaFilePath);
    }

    this.voiceMediaObj.vocieMediaFile.startRecord();`

When the stopRecord () method is called, the following error occurs:
`09-09 22:57:35.848 16978-17106/net.ws315.dalai D/AudioPlayer: renaming 
/storage/emulated/0/tmprecording-1536505053393.3gp to 
/data/user/0/net.ws315.dalai/cache/1536505053071.aac
09-09 22:57:35.849 16978-17106/net.ws315.dalai E/AudioPlayer: FAILED renaming 
/storage/emulated/0/tmprecording-1536505053393.3gp to 
/data/user/0/net.ws315.dalai/cache/1536505053071.aacFAILED renaming 
/storage/emulated/0/tmprecording-1536505053393.3gp to 
/data/user/0/net.ws315.dalai/cache/1536505053071.aac
09-09 22:57:35.849 16978-17106/net.ws315.dalai W/PluginManager: THREAD WARNING: 
exec() call to Media.stopRecordingAudio blocked the main thread for 114ms. 
Plugin should use CordovaInterface.getThreadPool().
09-09 22:57:35.910 16978-17108/net.ws315.dalai W/MediaPlayer: Couldn't open 
/data/user/0/net.ws315.dalai/cache/1536505053071.aac: 
java.io.FileNotFoundException: No content provider: 
/data/user/0/net.ws315.dalai/cache/1536505053071.aac
09-09 22:57:35.911 16978-17108/net.ws315.dalai I/MediaPlayerNative: 
setDataSource(114, 0, 576460752303423487)
09-09 22:57:35.913 16978-17108/net.ws315.dalai E/MediaPlayerNative: Unable to 
create media player`

[ Full content available at: 
https://github.com/apache/cordova-plugin-media/issues/181 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to