ESWT MIDlet may crash during MMAPI Player play on Symbian (Known Issue)
Article Metadata
Tested with
Devices(s): S60 5th Edition, Symbian^3
Compatibility
Platform(s): S60 5th Edition, Symbian^3
Article
Keywords: Manager.createPlayer()
Created: User:Kbwiki
(13 Apr 2011)
Last edited: hamishwillee
(01 Aug 2012)
Description
eSWT MIDlet may crash during MMAPI Player play on Symbian devices which use Java Runtime 1.3, 1.4, or 2.0 Beta for Symbian when playing is started outside of the UI thread for the eSWT API.
Solution
This issue has been fixed in Java Runtime 2.1 for Symbian.
For the affected Java Runtimes, MMAPI Players should be created in the UI thread.
First, the Manager should be initialised as follows:
Class.forName("javax.microedition.media.Manager");
Then the player creation should be done in the UI thread:
Display.getDefault().syncExec(new Runnable() {
public void run() {
try {
player = Manager.createPlayer("protocol://url/media.file");
} catch (Exception e) {
// handle exceptions if any
}
}
});


(no comments yet)