|
|
||
Qusay H. Mahmoud's BlogNetworking MIDlets and blocking operationsPosted by qmahmoud on April 18, 2007 at 12:41 PM | Comments (0)I get many email about the application featured in the article MIDP Database Programming with RMS. The application locks up the screen as the MIDlet tries to establish a wireless connection. This article was developed back in 2000 and back then everything worked perfectly. However, when developing networking MIDlets, pay special attention to blocking operations (e.g. methods that establish a connection to the network) which can lock up the screen, leaving the user frustrated with the application. To prevent this, all blocking operations should be performed in a separate thread. A more detailed explanation of this can be found in Preventing Screen Lockups of Blocking Operations in which I provide a detailed example of a network time MIDlet client. To fix the problem in the Stock Quotes MIDlet from the MIDP Database Programming article, edit the QuotesMIDlet.java file, and:
And this should solve the screen lockup problem. :-) There will be lots of Java ME cool stuff at JavaOne this year. To get an idea of what's planned for then, take a look at Terrence Barr's Java ME Guide to JavaOne 2007. Q. Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment | ||
|
|