Accessing media data over the network requires careful consideration because it involves two issues. First, network access should be done in a separate thread from the main thread, because accessing the network may block the main thread for a long time, leading to an unresponsive MIDlet. Second, network access requires permission from the user of the MIDlet as it may lead to charges from the network operator.
This chapter showed you how to overcome these two issues by explaining threads in Java ME and how they affect network access. The chapter also explained the concept of protection domains and how to overcome them for requesting permissions for network access. The chapter finished with an all-encompassing example that solved those two issues together.
The next chapter covers generating and playing tones using MMAPI with the help of the ToneControl control.
KeywordsNetwork Access Media File Remote Server Audio File Main Thread
Unable to display preview. Download preview PDF.