Hi all! 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 something wrong ? I not found limitation for MediaPlayer. Device - Samsung T959 (Galaxy S) Thanks, i hope anybody know solution....
A:
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.
MatteKarla
2010-09-22 20:43:29
Thank you for your reply, but changing Uri base not working :( Illegal argument exception appers when inserts to base
dmtrlbdv
2010-09-23 21:20:14
A:
Thank you for your reply, but changing Uri base not working :( Illegal argument exception appers when inserts to base
dmtrlbdv
2010-09-23 07:18:21
A:
Due to the Android security model, MediaPlayer haven't enough rights. It can access SD card, but can't access another places with out permissions.
As so, setDataSource(...) can thrown SecurityException and I think it's happening.
You can play this file next ways:
- copy it to temp dir and play;
- copy it to temp dir and play;
- copy it to sdcard;
- read it fully to memory and try play via stream.
dive
2010-09-23 08:47:28