Author
flashdomain
View
2.960
Download
1
Embed Size (px)
DESCRIPTION
Flash Lite Tips and Tricks
Alessandro PaceMobile Architect
© 2007 Nokia Company Confidential
Slide 2
Biography
•Mobile Architect, expertise Flash Lite since 2004
•Forum Nokia Champion since 2006
•Manager of the Boston Adobe Mobile and Devices User Group: flashmobilegroup.org
•Founder & organizer of Mobile Monday Boston
•Blogs at biskero.org, flashlite4nokia.com
•Site at biskero.com
© 2007 Nokia Company Confidential
Slide 3
Learn some key points on Flash Lite content development on the Nokia S60/S40 Platforms
At the end of this session, you will …
Goal
© 2007 Nokia Company Confidential
Slide 4
Agenda for today
•Understand the development cycle
•Flash Lite; which platform, what version?
•Flash Lite content creation – key points
•Flash Lite and Media
•Flash Lite and packaging
•Flash Lite version detection
•Flash Lite and OMA DRM
© 2007 Nokia Company Confidential
Slide 5
Understand the Flash Lite development cycle
• Nokia & Flash Lite content types• S60: standalone, screensaver and browser
• S40: all the above + wallpaper
• Flash IDE + Device Central emulator• Allows you to develop content for all Flash Lite versions and
Flash Lite content types
• Device Central: 70-80% of work
• Flash Lite testing• Remote Device Access (RDA), S60/S40 Nokia SDK
• Tip: get both S60 and S40 devices for testing all content types
Content type, IDE and Testing
© 2007 Nokia Company Confidential
Slide 6
Nokia S60 and S40 support Flash Lite 1.1, 2.0, 2.1, 3.0
Flash Lite; which platform, what version ?
• Nokia supports all the Flash Lite player versions• S60 3rd Edition
• Flash Lite 1.1
• S60 3rd Edition FP1• Flash Lite 2.0
• S60 3rd Edition FP2 & S60 5th Ed.• Flash Lite 3.0
• S40 3rd Edition FP1• Flash Lite 1.1
• S40 3rd Edition FP2• Flash Lite 2.0
• S40 5th Edition and FP1• Flash Lite 2.1 + 3.0 (latest)
• S40 6th Edition• Flash Lite 3.0
Tip 1: there some exceptions, i.e. E66, E71 have Flash Lite 3Tip 2: no new Nokia handsets with Flash Lite 1.1/2.0, but millions out
there!
© 2007 Nokia Company Confidential
Slide 7
Memory, FSCommands and System.capabilitiesFlash Lite content creation – key points
• Memory• Standalone up to 4 Mbytes, screensaver/wallpaper up to 1 Mbytes
• Garbage Collector (GC) use memory, runs every 60 seconds and for > 20% memory increase
• FSCommands API to create one SWF to “fit ALL”• FSCommand2("GetSoftKeyLocation");
• -1: Not supported 0: Soft keys on top 1: Soft keys on left 2: Soft keys on bottom 3: Soft keys on right
• Use System.capabilities• System.capabilities.audioMIMETypes
• System.capabilities.imageMIMETypes
• System.capabilities.videoMIMETypes
© 2007 Nokia Company Confidential
Slide 8
How to architect more complex Flash Lite content
Flash Lite content creation – key points cont.
• Optimize graphics to best render on specific mobile phone model• Color depth: 16/24 bit
• Use images for complex animations: less CPU cycles
• Use most common fonts or pixel fonts
• Multiple SWF architecture for more complex content• Extend content features: for example multi-level games
• Memory optimization
Tip: create “Master SWF” to load other SWFs
© 2007 Nokia Company Confidential
Slide 9
Different sound capabilities based on Flash Lite version
Flash Lite and Media: sound
• Flash Lite 1.1• Device sound, midi sounds
Trick: getURL() API to download/stream audio, i.e. .mp3/.aac
• Flash Lite 2.x• Audio API local/remote (no streaming), in memory playback
Trick: use video API to stream a .3gp file with audio and no video !
• Flash Lite 3.0• mp3 streaming using Flash Media Server (rtmp:// protocol)
Tip: Nokia default streaming protocol is rtsp://
© 2007 Nokia Company Confidential
Slide 10
Different video capabilities based on Flash Lite versionFlash Lite and Media: video
• Flash Lite 1.1 Trick: getURL() API to download/stream video (i.e. .3gp/.mp4)
• Flash Lite 2.x: it uses the device video player within the Flash Lite content for playback• Video API, local/embedded/streaming (rtsp://)
Trick: use loadMovie API to load (http) an embedded .3gp video into a .swf. In memory playback!
• Flash Lite 3.0• Flash Video (.flv) local/progressive
download/embedded/streaming
• Streaming via Flash Media Server (rtmp:// protocol)
Tip: some of the latest Nokia S60 devices support FLV video playback
© 2007 Nokia Company Confidential
Slide 11
Sample code to playback local mediaFlash Lite: audio, video API
// Load and Play Audio trackvar audiotrack:Sound = new Sound();audiotrack.onLoad = function(success) {
if (success == true) {audiotrack.start();trace("audio track loaded");
} else {trace("Error loading audiotrack");
}};// Load Audio Track Objectaudiotrack.loadSound("nokiabrandmusic.aac",false);
// Load and Play FLV Video
var nokiaVideo:NetConnection = new NetConnection();
nokiaVideo.connect(null);
var videoFLV:NetStream = new NetStream(nokiaVideo);
videoFLV.play("nseriesad.flv");
NokiaFLV.attachVideo(videoFLV);
// Load and Play 3GP Video
video3gp.play("nseriesad.3gp");
DEMOFlash Lite and Audio/Video
© 2007 Nokia Company Confidential
Slide 13
Get newer version of the Flash Lite playerFlash Lite and Firmware update
• Latest firmware introduce Flash Lite 3 and WRT• Nokia N95
• Nokia N95 8GB
• Nokia N95 NAM
• Nokia E90
• Nokia N82
Tip: these phones are Flash Lite 2.0 enabled
© 2007 Nokia Company Confidential
Slide 14
Setup web server for OMA DRM content deliveryFlash Lite and Packaging
• Nokia Packaging and Flash Lite• x-epoc/x-sisx-app .sis
• x-epoc/x-sisx-app .sisx
• application/java-archive .jar
• application/x-nokia-widgets .wgz
• application/vnd.nokia.flashlite-archive .nfl
• Third Party packaging + lib extension tools• KuneryLite/SWFPack - .sis packaging + lib extension for S60
• SWF2Go - .sis packaging for S60
• Janus - .sis packaging for S60 (Open Source)
• Flyer Framework - .sis packaging + lib extension (PyS60) for S60 (Open Source)
• Jarpa - .jar packaging + lib extension (J2ME) for S60/S40 (Open Source)
• SWF2NFL - .nfl (AIR packaging tool) for S40 5th Ed FP1+
• W-d-get-it - .nfl and .wgz packaging + OMA DRM 1.0 FLock
© 2007 Nokia Company Confidential
Slide 15
Set up a mobile site to distribute Flash Lite contentFlash Lite version detection for delivery
• WURFL (Wireless Universal Resource File): is an XML configuration file which contains information about capabilities and features of many mobile devices
• WURFL is based on User Agent Profile information
• API: JAVA, PHP, Perl, Ruby, Python, .Net, XSLT, C++
• It includes Flash Lite capabilities
• WURFL-Flash Lite discussion group: http://tech.groups.yahoo.com/group/wurflflashlite/
Source: http://wurfl.sourceforge.net
© 2007 Nokia Company Confidential
Slide 16
Compare UA string from mobile site to the one in WURFLFlash Lite and WURFL cont.
• Nokia N95 firmware 10.0.014• Mozilla/5.0 (Symbianos/9.2; U; Series60/3.1
NokiaN95/10.0.014; Profile/MIDP-2.0 Configuration/CLDC-1.1) AppleWebKit/413 (KHTML, like Gecko) Safari/413
<group id="flash_lite"> <capability
name="flash_lite_version" value="2_0"/>
<capability name="fl_wallpaper" value="false"/>
<capability name="fl_screensaver" value="true"/>
<capability name="fl_standalone" value="true"/>
<capability name="fl_browser" value="true"/>
<capability name="fl_sub_lcd" value="false"/>
</group>
Source: http://wurfl.sourceforge.net
• Nokia N95 firmware 21.0.016• Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1
NokiaN95/21.0.016 Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413
<group id="flash_lite">
<capability name="flash_lite_version" value=“3_0"/>
<capability name="fl_wallpaper" value="false"/>
<capability name="fl_screensaver" value="true"/>
<capability name="fl_standalone" value="true"/>
<capability name="fl_browser" value="true"/>
<capability name="fl_sub_lcd" value="false"/>
</group>
© 2007 Nokia Company Confidential
Slide 17
Flash Lite is considered passive content, like a jpeg or mp3Flash Lite and OMA DRM 1.0
• “Symbian Signed defines Passive Content (PC) as any SIS file that does not contain any executable (active) components.”
• OMA DRM 1.0:• Forward lock
• Combined Delivery
• Separate Delivery
• Use Nokia Multimedia Internet ToolKit 4.1 tool to apply OMA DRM 1.0
• application/x-shockwave-flash
© 2007 Nokia Company Confidential
Slide 18
Nokia Multimedia Internet Toolkit 4.1Flash Lite and OMA DRM 1.0 cont.
© 2007 Nokia Company Confidential
Slide 19
Setup web server for OMA DRM content deliveryFlash Lite and OMA DRM 1.0 cont.
• MIME types to be defined on the web server• application/vnd.oma.drm.rights+xml .dr
• application/vnd.oma.drm.rights+wbxml .drc
• application/vnd.oma.drm.content .dcf
• application/vnd.oma.drm.message .dm
• application/vnd.oma.drm.dd+xml .dd
Tip: Nokia mobile phone browser support Flash Lite content
DEMOOMA DRM 1.0 Flash Lite protected content
http://www.biskero.org/nokia/drm/
© 2007 Nokia Company Confidential
Slide 21
Utilize global intelligence –Utilize global intelligence –
visitvisit
Call for Action
community.forum.nokia.comcommunity.forum.nokia.com
© 2007 Nokia Company Confidential
Slide 22
For More Information
Forum Nokia resources• Forum Nokia developer information:
http://www.forum.nokia.com
• Community page: http://community.forum.nokia.com
• Forum Nokia Flash Lite Wiki and Discussions
• Adobe Mobile and Devices http://www.adobe.com/mobile
• My blogs:• www.biskero.org
• www.flashlite4nokia.com
Tip: Join the Boston Adobe Mobile and Devices User Group www.flashmobilegroup.org it’ FREE !!!