Hi friends,
I have written a small player. It has the controls like fastForward and fastBackward.
the code looks like:
public void skip(boolean backwards)
{
if (player != null)
{
try
{
long mTime = player.getMediaTime();
long jump = 10000000;
if (backwards)
{
setMediaTime(mTime-jump);
}
else
{
setMediaTime(mTime+jump);
}
}
catch (IllegalStateException ise)
{
}
}
public void setMediaTime(long time)
{
if (player == null)
{
return;
}
try
{
player.stop();
player.setMediaTime(time);
player.start();
}
catch (Exception e)
{
}
}
I am getting null pointer exception in Nokia 6300 which is S40.
But when I run the same code on E61i, its working fine.
Is there any limitation on S40 for media controls?
or
Am I doing any wrong?
Please help me.
Thanks,
Manoj.

Reply With Quote


