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
New Developer
Posts: 3
Registered: ‎06-22-2009
My Device: Not Specified

Interacting with media object spawned by another application

Hi all,

 

It is my understanding that if I create a media object within my application (using MediaManager), and play it with MediaPlayer's methods, I can interact with it fully; that is, for example, I can use getMediaTime to get its current time.

 

However, is it possible to interact with the media objects from another application, say from the Blackberry's inbuilt music player? The idea is that my application runs in the background, and then the user goes to play his/her music normally through the Music application. I would like my application to be able to determine what is currently playing / its current media time. I don't think this is possible, but I've just started Blackberry development, so I was hoping someone could suggest some way of doing it? Apologies if it sounds like a stupid question.

 

Thanks

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Interacting with media object spawned by another application

Even I feel this is not possible.

Use Search. "Accept Solution" If the problem is resolved.
New Developer
Posts: 3
Registered: ‎06-22-2009
My Device: Not Specified

Re: Interacting with media object spawned by another application

That's annoying. Are you sure there is no way to retrieve information about what is "Now Playing"? Given that there are other static methods that allow you to determine some aspect of the Blackberry's general state, like WLANInfo.getWLANState(), I suspect there might be similar methods for "Now Playing".
Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Interacting with media object spawned by another application

You can try with MetadataControl.. but this is only for the player you implemented not for the default device player.

Use Search. "Accept Solution" If the problem is resolved.
New Developer
Posts: 3
Registered: ‎06-22-2009
My Device: Not Specified

Re: Interacting with media object spawned by another application

I have a somewhat hackish idea... would it be possible to add my own menu item to the default device player, and put my code in that menu item's constructor? (constructor as opposed to run() because I would like my code to run regardless of whether or not the user clicks the menu item) The file information (or possibly MediaPlayer object?) should be present in "context" passed to the constructor ApplicationMenuItem(Object context, int order). Would that work?
Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Interacting with media object spawned by another application

Definitely you can give a try and share the result with others.

Use Search. "Accept Solution" If the problem is resolved.
New Developer
Posts: 1
Registered: ‎12-09-2009
My Device: Not Specified

Re: Interacting with media object spawned by another application

hi, any luck with this ?

i'm also trying to access the 'now playing' info from the default media player.

i.e. song title, artist name, etc...

 

Smiley Sad

Contributor
Posts: 47
Registered: ‎06-27-2010
My Device: Bold 9700
My Carrier: AT&T

Re: Interacting with media object spawned by another application

Has anyone found a way to do this?  I am also interested in finding the Now Playing information from within my app.