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
Developer
zaratustraelimp
Posts: 171
Registered: ‎03-04-2009
My Device: Not Specified

Call for sound playback function??¿¿

Hi, I'm doing an application where I need to play a file recorded with the blackberry. How can I call the sound playback application with the recorded file? thanks in advance.

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Call for sound playback function??¿¿

Take a look at Player in the API docs.

 

 

Please use plain text.
Developer
zaratustraelimp
Posts: 171
Registered: ‎03-04-2009
My Device: Not Specified

Re: Call for sound playback function??¿¿

I want to say is how I make a call to this application. For example, to call a contact I do this:

Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, new PhoneArguments(PhoneArguments.ARG_CALL, campoTelefono.getText()));	

 

how can I do to call this application with my file?

Please use plain text.
Developer
simon_hain
Posts: 15,842
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Call for sound playback function??¿¿

check the invoke class for the supported apps.

other apps can be called using the applicationmanager. I don't know about possible parameters, maybe you find some if you toy around. check the list of installed modules for the media player.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
zaratustraelimp
Posts: 171
Registered: ‎03-04-2009
My Device: Not Specified

Re: Call for sound playback function??¿¿

The invoke class has only the following applications:

 

static int APP_TYPE_ADDRESSBOOK
Connect to the Address Book application. static int APP_TYPE_BLUETOOTH_CONFIG
Connect to the Bluetooth Configuration static int APP_TYPE_CALCULATOR
Connect to the Calculator application static int APP_TYPE_CALENDAR
Connect to the Calendar application. static int APP_TYPE_CAMERA
Connect to the Camera application static int APP_TYPE_MAPS
Connect to the BlackBerry Maps application. static int APP_TYPE_MEMOPAD
Connect to the Memo Pad application. static int APP_TYPE_MESSAGES
Connect to the Message application. static int APP_TYPE_PHONE
Connect to the Phone application. static int APP_TYPE_SEARCH
Connect to the Search application static int APP_TYPE_TASKS

 

any idea?

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Call for sound playback function??¿¿

Why not just use the Player interface? What are you trying to accomplish, anyway?

 

 

 

 

Please use plain text.
Developer
zaratustraelimp
Posts: 171
Registered: ‎03-04-2009
My Device: Not Specified

Re: Call for sound playback function??¿¿

[ Edited ]

How I can use the Player interface?? I only want to use a screen to play my file...

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Call for sound playback function??¿¿

Did you check the API docs? There is quite a lot of info there.

 

A trivial example:

 

 try {
     Player p = Manager.createPlayer("http://abc.wav");
     p.start();
} catch (MediaException pe) {
} catch (IOException ioe) {
}

You can also play a file or a resource (embedded in your application).

 

If you search the forum, you will find many threads on the subject.

 

 

Please use plain text.
Developer
zaratustraelimp
Posts: 171
Registered: ‎03-04-2009
My Device: Not Specified

Re: Call for sound playback function??¿¿

Hello, I wanted to use the application to BB because it have more functionality. I have seen the player interface, but the start () method is to record, how can I play my file? thanks

Please use plain text.