05-28-2009 11:42 AM
This is a strange issue that I hope someone might have insight into.
I am developing an application with the 4.3.0 JDE in Eclipse. The primary purpose of the application is to play streaming audio from a server, where the audio is typically in mp3 format.
The application works well on a 4.3.0 JDE simulator and 4.3.0 Blackberry Pearl device, on both Wifi and Edge. It can browse the network and initiate playback correctly with the javax.microedition.media.Player. URLs through the simulator append ;deviceside=true across all simulators, and URLs through the device make use of the techniques in the Network Diagnostic application to identify the appropriate method. The simulators are not launching the MDS-CS simulator.
On 4.5.0, 22.214.171.124, and 126.96.36.199 simulators, however, I experience problems. The application is able to browse through the list of files correctly (meaning, it can send requests and receive data and graphics from an HTTP web service without issue). However, when it comes down to playing a file, various incorrect results ocur, based on the version of the device tested.
8120 running 4.5.0 : gets past player.realize(), player.prefetch(); gets stuck on player.start()
8900 running 188.8.131.52: gets stuck on player.realize() until I receive MediaException: TCP receive timed out
9500 running 184.108.40.206: player.realize() blocks, occasionally throwing MediaException: Connection Closed or MediaException: Connection Closed (although, on one occasion of about 10 tries, I was able to get through the chain and play about 13 seconds of audio before it simply stopped playing and refused to buffer any more).
My simulation process is:
- Build app
- Copy into simulator directory
- Run via batch file
- Use BB JDE app > Debug > Attach To > Simulator to get debugging information
The player code is roughly:
url = NetworkManager.buildUrl(url); // add ;deviceside=true for simulator
player = Manager.createPlayer(url);
player.addPlayerListener(this); // listen for updates/stops/closes
player.start(); // start (or resume) player
I was able to have a tester test the application on a Blackberry Bold on AT&T, and the audio played well according to them. However, I do not have a Bold or Storm, and without a working simulator debugging is going to be very very difficult.
Does anyone have suggestions? Is this a case of different JDE --> poor results? Or is it a problem with the simulator and audio?
Thanks in advance,
06-04-2009 09:18 AM
The first step is to determine if this is an issue with the network configuration or with the media file itself. Since it works on a real BlackBerry smartphone it is likely to be a network issue with the BlackBerry Simulator.
Are you able to play the same files in the BlackBerry Browser of the BlackBerry Simulator and/or when embeding them within your application (similar to the embededmediademo included with the BlackBerry JDE)? Is there any sort of proxy or network restriction in your environment?
01-26-2010 09:20 PM
I am having the same problem: trying to retrieve and play mp3 files, using 4.5. Some files play all the way through.
Others (longer than one minute) play almost all the way, but then stop retrieving data before all the data has been
requested. And sometimes no request at all is made.