Hi,
I am writing a player application.
For that I am using input stream.
My code looks like this:
try
{
Fileconnection fc = (FileConnection)Connector.open(mediafileLoc);
InputStream is = fc.openInputStream();
Player p = Manager.createPlayer(is,null);
p.prefetch();
p.realize();
p.start();
}
catch(Exception e)
{
//showing alert
}
its working fine on first time. when I closed and tried to play the same song I got an exception:"File is used by the application".
When closing the player I wrote like this:
try
{
p.closePlayer();
is.close();
is = null;
fc.close();
fc = null;
}
catch(Exception e)
{
//showing alert
}
What might be the problem?
can you please help me.
Thanks,
Manoj.

Reply With Quote


