Run the sample application

To interact with this sample application, press the media keys on your BlackBerry® Smartphone Simulator. Media keys are often located on the sides and top of the BlackBerry device. Your BlackBerry Smartphone Simulator should have keys for volume control (Volume Up key, Volume Down key, and Mute key). It might also have a Play/Pause key, Next key, and Previous key.

  1. In Eclipse®, in the Navigator window, right-click the MediaKeysDemoMIDlet folder.
  2. Click Run As > BlackBerry Simulator
  3. If neccessary, on the Home screen of the BlackBerry Smartphone Simulator, click the Downloads folder.
  4. Click the Media Keys Demo MIDlet icon.
  5. Press the media keys that are available on your BlackBerry Smartphone Simulator. When you press a media key, the name of the key is displayed on the screen and printed to standard output.
  6. Press the Menu key.
  7. Click Switch Application.
  8. Click another application.
  9. Press a different media key than the last key displayed in step 5.
  10. Press the Menu key again.
  11. Click Switch Application.
  12. Click the Media Keys Demo MIDlet icon. The name of the media key you pressed in step 9 is displayed on the screen.
  13. Clear the Media Player Mode Enabled check box.
  14. Repeat steps 6 to 12. The media key name is no longer displayed on the screen.

Was this information helpful? Send us your comments.