Hello, I am using linux so i have installed Android in it. I am
getting the exception while calling prepare() from MediaPlayer
object. The following is my code.
[b]
File bufferedFile = new File(context.getCacheDir(),"playingMedia" +
(counter++) + ".dat");[/b]
moveFile(downloadingMediaFile,bufferedFile);
Log.e("Player",bufferedFile.length()+"");
Log.e("Player",bufferedFile.getAbsolutePath());
mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource(bufferedFile.getAbsolutePath());
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
System.out.println("before preapare");
[b] mediaPlayer.prepare();[/b]
I am adding the code tutoril also so if any one of you have few
minutes then please check it. Accoridng to my opiong it i facing some
problem in accessing file system so. Can some one tell me what could
be wrong in it ?
another thing which i want to know is Can some one tell me
context.getCacheDir() will return ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---