MediaPlayer cant play audio files from program data folder?

后端 未结 5 1722
春和景丽
春和景丽 2021-02-15 18:11

When i record my audio from MIC and store file in /data/data/..... why MediaPlayer can\'t play this file ? If i change destination to / sdcard/..... - all works great. I do so

5条回答
  •  野的像风
    2021-02-15 18:59

    Try setting ContentValues and to store some standard meta-data properties. Then using a ContentResolver to set the meta-data and Uri to the file.

    see: http://developer.android.com/guide/topics/media/index.html

    "Example: Audio Capture Setup and Start", then try changing Uri base to your /data/data/-filename.

提交回复
热议问题