NateRickard / Plugin.AudioRecorder

Audio Recorder plugin for Xamarin and Windows
MIT License
164 stars 68 forks source link

Can't play the recorded audio #37

Closed DD2XAlpha closed 5 years ago

DD2XAlpha commented 5 years ago

Hello, well as I explain in the title, I can not play the recorded audio, I checked the actual path of filePath in my device (physical) and nothing is in there.

I followed one of your samples.

Sorry that I can not provide my code because I can't share it.

Thanks

Sketchizer commented 5 years ago

I have the exact same problem.

NateRickard commented 5 years ago

Can you confirm that you've set the necessary permissions? Does the library log anything when you debug your app?

DD2XAlpha commented 5 years ago

I have the permissons, the phone asked for it and gave them. It doesn't throw any error at all, it just records but never saves it in the temporal folder.

I have the permissons of Data Management (because I take pictures in the app and save them in a folder) and the permisson of recording audio.

image (Is in spanish but I think the icons are self explanatories)

Sketchizer commented 5 years ago

After a bit of research in the code, I found that the "FilePath" argument can be used in the recorder initialization to specify any intended path for saving the recording. For me, I changed it to point to the local application resource folder in Xamarin.Forms & I can now view the recording in the actual folder specified.

DD2XAlpha commented 5 years ago

I tried to save it in a local folder but it tells me that I don't have the permissons to do so... How did you get it to work? Could you post if possible your code?

Sketchizer commented 5 years ago

In the platform permissions you need to request access for external storage. In Android, it is WRITE_EXTERNAL_STORAGE for example. You need to make sure that the app permissions on your phone settings shows that storage permission is enabled.

NateRickard commented 5 years ago

@DD2XAlpha were you able to get it working with the external storage permission?