Play audio in the BlackBerry Browser

  1. Import the required classes.
    import net.rim.blackberry.api.browser.Browser;
    import net.rim.blackberry.api.browser.BrowserSession;
  2. Invoke Browser.getDefaultSession().
    BrowserSession soundclip = Browser.getDefaultSession();
  3. Invoke BrowserSession.displaypage().
    soundclip.displayPage("file:///SDCard/BlackBerry/music/yourFile.mp3");

Was this information helpful? Send us your comments.