Download presentation
Presentation is loading. Please wait.
Published byChristian Johnston Modified over 9 years ago
1
© 2009 Research In Motion Limited Advanced Java Application Development for the BlackBerry Smartphone Trainer name Date
2
© 2009 Research In Motion Limited Agenda In this course, you will cover the following topics: –Introduction to advanced mobile application development for the BlackBerry ® smartphone –Application control for mobile devices –Optimization for mobile application development –Advanced BlackBerry user interface –Introduction to multimedia application development for the BlackBerry smartphone –Understanding push technology
3
© 2009 Research In Motion Limited Agenda In this course, you will cover the following topics: –Understanding client/server push –Introduction to developing Bluetooth ® applications for mobile devices –Developing secure applications
4
Advanced Java Application Development for the BlackBerry Smartphone Objectives: –Explain the importance of playing media within a media application –Create a media application –Play media in a BlackBerry smartphone application –Discuss the use of media events –Send and receive media events –Discuss audio routing © 2009 Research In Motion Limited
5
Advanced Java Application Development for the BlackBerry Smartphone Objectives: –Create an application that records audio –Identify supported audio and video formats –Identify optimal settings for audio and video on BlackBerry smartphones © 2009 Research In Motion Limited
6
Introduction to multimedia application development for the BlackBerry smartphone
7
Playing media You can choose to play media in your BlackBerry smartphone applications in several ways: –Create a media application that can play a variety of media types and formats –Play media using the BlackBerry Browser –Play media using the BlackBerry smartphone media application © 2009 Research In Motion Limited
8
Playing media –You can create a media application by using the API items in the javax.microedition.media (JSR 135) package that : –plays a sequence of tones –plays media from a web address –plays media from an input stream –plays streaming media –displays a video in a field –displays an image from the camera viewFinder © 2009 Research In Motion Limited
9
Playing media using the BlackBerry Browser –Your BlackBerry application can play media in the BlackBerry Browser by using the methods of the Browser class and BrowserSession class © 2009 Research In Motion Limited
10
Playing media within a media application –Use the media application to play media that is: –stored on a local device –streamed from a remote device –both local and streamed media. © 2009 Research In Motion Limited
11
Playing media using the BlackBerry Browser © 2009 Research In Motion Limited
12
Playing media using the BlackBerry Browser –Use the methods of the Browser class and BrowserSession to play media: Playing audio Playing video © 2009 Research In Motion Limited
13
Playing media in the BlackBerry smartphone Media application © 2009 Research In Motion Limited
14
Playing media in the BlackBerry smartphone Media application –Start the Media application with or without content –Streaming data from a remote source to the Media application © 2009 Research In Motion Limited
15
Playing media within your Media application © 2009 Research In Motion Limited
16
Playing media within your Media application Accessing stored media –Accessing media on a BlackBerry smartphone –Accessing media on a microSD card © 2009 Research In Motion Limited
17
Playing media within your Media application Streaming media in a BlackBerry device application –Buffer and play streamed media create a custom class that extends javax.microedition.media.protocol.DataSource to customize how data is read DataSource provides a SourceStream implementation © 2009 Research In Motion Limited
18
Creating a media player © 2009 Research In Motion Limited
19
Creating a media player –Use javax.microedition.media (JSR 135) package to play audio –A media application must be created first and then have functionality added. © 2009 Research In Motion Limited
20
Playing media in a BlackBerry smartphone application © 2009 Research In Motion Limited
21
Playing media in a BlackBerry smartphone application –Use javax.microedition.media (JSR 135) package to play audio –Provides methods to manage media application and control the playback © 2009 Research In Motion Limited
22
Playing media in a BlackBerry smartphone application –An object of a class that implements the Player interface can be in one of five states: UNREALIZED REALIZED PREFETCHED STARTED CLOSED © 2009 Research In Motion Limited
23
Playing media in a BlackBerry smartphone application –Changing the state of a Player –Playing media in a BlackBerry application © 2009 Research In Motion Limited
24
Receiving and sending media events © 2009 Research In Motion Limited
25
Receiving and sending media events –Use javax.microedition.media (JSR 135) package to listen for and send media application events: Listen for changes to the state of the media application Send the media application event to the registered PlayerListener © 2009 Research In Motion Limited
26
Routing audio © 2009 Research In Motion Limited
27
Routing audio –Use the AudioPathControl API to play back and record audio –Supported audio paths: Bluetooth--AUDIO_PATH_BLUETOOTH A2DP--AUDIO_PATH_BLUETOOTH_A2DP Handset--AUDIO_PATH_HANDSET © 2009 Research In Motion Limited
28
Routing audio –Supported audio paths: Handsfree--AUDIO_PATH_HANDSFREE Headset--AUDIO_PATH_HEADSET Headset Handsfree-- AUDIO_PATH_HEADSET_HANDSFREE © 2009 Research In Motion Limited
29
Recording audio © 2009 Research In Motion Limited
30
Recording audio –Two formats for recording audio: AMR (Default) 8 kHz mono-16-bit PCM © 2009 Research In Motion Limited AMR Adaptive Multi-Rate PCM pulse code modulation
31
Supported audio and video formats © 2009 Research In Motion Limited
32
Supported audio and video formats –The BlackBerry smartphone Media application can open the following types of media files: Videos Ring tones Pictures Music files © 2009 Research In Motion Limited
33
Supported audio and video formats BlackBerry Browser audio and video support Support for web feeds BlackBerry ® Device Software version 4.2 or later: –RSS 0.9, 1.0, and 2.0 –Atom ™ BlackBerry Device Software version 4.2.2 or later: –RSS enclosures © 2009 Research In Motion Limited RSSreally simple syndication
34
Supported audio and video formats BlackBerry browser audio and video support Support for web feeds BlackBerry browser displays media file based on their type Steamed content is not stored © 2009 Research In Motion Limited
35
Supported audio and video formats BlackBerry browser audio and video support Support for media streaming BlackBerry Device Software supports a wide variety of formats, including the following (version 4.3 or later): –Video: WMV, h.263 –Audio: MIDI, MP3, MP4, WAV © 2009 Research In Motion Limited WMVWindows Media VideoMIDImusical instrument digital interface WAVWave
36
Supported audio and video formats BlackBerry browser audio and video support Support for media streaming Media streaming over HTTP or RTSP protocols Network gateway can limit streaming file size No file size limitations over Wi-Fi ® © 2009 Research In Motion Limited HTTPhypertext transfer protocol RTSPreal time streaming protocol
37
Supported audio and video formats BlackBerry smartphone audio and video support –There are specific codecs for audio and video for each BlackBerry smartphone type. –Some formats support RTSP –Streaming requires BlackBerry Device Software 4.3 or later © 2009 Research In Motion Limited
38
Summary © 2009 Research In Motion Limited
39
Summary –You can create an application that: Plays media in the BlackBerry Browser Plays media in the Media application –You can also create an application that: Can play audio, video, and binary SVG content Record audio and video Send audio to a Bluetooth enabled headset © 2009 Research In Motion Limited
41
Legal Disclaimer The following trademarks and/or registered trademarks of Research In Motion are referred to in this presentation: –BlackBerry® © 2009 Research In Motion Limited
42
Legal Disclaimer © 2009 Research In Motion Limited. All rights reserved. BlackBerry®, RIM®, Research In Motion®, SurePress™ SureType® and related trademarks, names and logos are the property of Research In Motion Limited and are registered and/or used in the U.S. and countries around the world. All other trademarks are the property of their respective owners. This documentation is provided "AS IS" and without condition, endorsement, guarantee, representation or warranty, or liability of any kind by Research In Motion Limited and its affiliated companies, all of which are expressly disclaimed to the maximum extent permitted by applicable law in your jurisdiction.
43
© 2009 Research In Motion Limited Revision history Document versionDateUpdated byDescription of revision
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.