- Understanding the Java WTK
- The RTTTLEx Application
- Creating a List of Ring Tones
- Understanding the MIDP List Class
- Working with the Display Object and the Displayable Interface
- Configuring Commands
- Registering CommandListeners
- The Methods of a MIDlet
- Selecting a Tune
- The MIDP Canvas Object
- Playing a Tune
- Conclusion
The RTTTLEx Application
The ring tone application that I created in the previous article in this series, called RTTTLPlayer, showed you how to create custom mobile ring tones using RTTTL. However, the application was a usability nightmare, as shown in Figure 1. It required that the user keystroke a URL to access the ring tone file on the Internet. Clearly this left the door open for a plethora of input mistakes. Cell phone keyboards are small and typing on them is difficult. Making a mistake is easy.
Figure 1 The old RTTTLPlayer app required that the user input a ring tones URL.
A better method of selecting RTTTL URLs is to have a list of preconfigured URLs displayed on the cell phone screen, from which the user selects the item that he or she wants to hear. Then, once a selection is made, the user simply hits the Play button on the cell phone to hear the tune. My to-do list to implement these new features is follows:
Create a list of available tones to play.
Associate each tone in the list with a specific URL.
Display the list on the cell phone screen.
Allow the user to select a ring tone from the list.
Play the corresponding ring tone.
Figure 2 shows the eventual results of this project.
Figure 2 The cell phone displays a list of selectable ring tones that can be played.