Thanks for your quick reply. But i do not know why it is giving error while calling prepare() from MediaPlayer.
On Apr 16, 7:36 pm, David Turner <di...@android.com> wrote: > If you use SDK 1.1, there is no cache partition in the emulator, unless you > use the -cache <file> option. > > If you use the preview SDK 1.5, then a cache partition file is automatically > created for you when you create an AVD, and > will be used automatically when you start the emulator with this AVD. > > On Thu, Apr 16, 2009 at 2:38 PM, Honest <honestsucc...@gmail.com> wrote: > > > 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---