Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
krishna85
Posts: 36
Registered: ‎10-12-2012
My Device: developer
My Carrier: developer

what is getMediaTime() in blackberry?

what is the usage of player.getMediaTime() in blackberry.....how to get the current postion of the player using player.getMediaTime() ... pls can anyone explain

Please use plain text.
Developer
pankajace12
Posts: 192
Registered: ‎04-30-2011
My Device: Software
My Carrier: Airtel

Re: what is getMediaTime() in blackberry?

hi krishna

if you need to implement pause and resume concept then this function is required.

/*This method is used to pause audio player*/
public static void pause()
{
try {
_player.setMediaTime(_player.getDuration());
_player.getMediaTime();
} catch (MediaException e)
{
Utility.showExcpetion(e.toString());
e.printStackTrace();
}
}
/*This method is used to play audio player*/
public static void resume()
{
try {

_player.setMediaTime(_player.getDuration()-_player.getMediaTime());
_player.start();
} catch (MediaException e)
{
Utility.showExcpetion(e.toString());
// TODO Auto-generated catch block
e.printStackTrace();
}
}

Thanks
Please use plain text.
Contributor
krishna85
Posts: 36
Registered: ‎10-12-2012
My Device: developer
My Carrier: developer

Re: what is getMediaTime() in blackberry?

can we use it to insert a voice recording in between another recording.....? Such as to find the paused position in the player

Please use plain text.
Developer
pankajace12
Posts: 192
Registered: ‎04-30-2011
My Device: Software
My Carrier: Airtel

Re: what is getMediaTime() in blackberry?

Hi Krishna

Let it try.

Thanks
Please use plain text.
Contributor
krishna85
Posts: 36
Registered: ‎10-12-2012
My Device: developer
My Carrier: developer

Re: what is getMediaTime() in blackberry?

hi pankaj! actually i want to insert a voice recording at the paused position of the player in blackberry.... have u got any idea how to do it...

Please use plain text.
Developer
pankajace12
Posts: 192
Registered: ‎04-30-2011
My Device: Software
My Carrier: Airtel

Re: what is getMediaTime() in blackberry?

HI Krishna,

I have no idea.

Because, i have not gone through this req.

Thanks
Pawan
Please use plain text.