Silverlight, a cross-browser, cross-platform
implementation of the .NET Framework for building media experiences and rich
interactive applications for the Web on desktop computers, is also available
for Nokia S60 5th Edition devices.
Microsoft Silverlight for Symbian – Beta includes a
runtime that is optimized to display content on memory-constrained devices.
Silverlight support for Nokia S60 5th Edition devices includes:
· The ability to view Silverlight applications in the mobile browser.
· Tools to build Silverlight applications that target devices.
You can create Silverlight-based applications for
devices by using Expression Blend 2 (free trial version), Visual Web Developer
2008 Express with SP1, or Visual Studio 2008 SP1 with Silverlight Tools for
Visual Studio 2008 SP1. Application deployment on IIS is supported in the beta.
Silverlight for Symbian enables you to run Silverlight applications on the Nokia S60 5th Edition platform. The installable executable includes the Silverlight runtime for Symbian, sample applications, and developer documentation. This topic provides the following information:
· Supported Development Languages
· Obtaining and Installing Microsoft Silverlight for Symbian – Beta Developer Tools
· Getting an S60 Emulator with the Silverlight Runtime
· Installing the Silverlight Runtime on an S60 Device
· How to Run Samples on an S60 Emulator
· How to Run Samples on an S60 Device
· How to Develop a Silverlight Application for S60
The Silverlight runtime for Symbian is hosted in the
S60 default browser only (WebKit-based).
All Nokia S60 5th Edition devices are
supported, including the following:
· Nokia 5800 XpressMusic
· Nokia N97
· Nokia N97 Mini
· S60 5th Edition SDK v1.0 Emulator
The Nokia S60 browser is based on Webkit. Browser versions 7.1.xxx or higher are supported. However, for optimal performance and bug fixes, version 7.2.xxx or higher version is recommended.
Browser version 7.2.xxx will be available with the next firmware update. To view the browser version on Nokia N97, open the browser and select Options, then Help, and then About Application. A value similar to the following is displayed: About Application BrowserNG/7.1.18124.
C# is the only language that is supported for
Silverlight application development on devices.
Note Visual Basic is not supported in this
release.
You can create Silverlight 2 sites by using this beta
release. JavaScript is not supported due to browser limitations. Although some
JavaScript features will work, Silverlight 1 sites using JavaScript are not
supported. Silverlight 1 sites using only XAML are supported.
The dynamic language runtime (DLR) is not supported on
devices. IronPython, IronRuby, and Managed JScript, which require the DLR, are
not supported.
Silverlight for Symbian – Beta is delivered in two formats: an installable binary (SISX format) that users can download over the web to run Silverlight applications, and an installable setup package for development. Both are available on the download center. Silverlight for Symbian – Beta is not part of the ROM of any of the shipped devices. This section describes installation of the developer tools and the package contents.
To install Microsoft Silverlight for Symbian – Beta Developer Tools for development, double-click the setup file, accept the EULA and follow the installation instructions.
· Silverlight runtime for Symbian – A Symbian OS installer file (.sis or .sisx) that installs the runtime on the device. The file is located in installation folder\Redist\Device.
· Silverlight runtime for S60 5th Edition emulator - A command file that installs and uninstalls the runtime on the emulator. The file, called InstS60Emu.cmd is located in installation folder\Redist\Emulator\.
· Sample applications – A set of sample applications with source code. They are located in installation folder\Samples.
The following samples are included:
· Digg – This is a Silverlight 2–based application. It includes Visual Studio 2008 project files and C# source code.
· Hello World – This is a Silverlight 2–based application. It includes Visual Studio 2008 project files and C# source code.
· SilverPlayer - This is a Silverlight 2–based application. It includes Visual Studio 2008 project files and C# source code. This application can be used as a template for other media applications.
· Developer documentation – This Getting Started document and other documentation is located in installation folder\Docs.
The Platform Limitations document describes the Silverlight 2 features that are supported on Nokia S60, and known issues.
Note: Download the Silverlight 2 Software Development Kit (SDK) Documentation to obtain Help documentation for Silverlight 2.
To get an S60 emulator with the Silverlight runtime, perform the following steps:
1. Install Java Runtime version 1.6.0 or later with default options. Install from the Java Web site.
2. Install Active Perl 5.6.1 build 635 or later with default options. Install from the ActiveState Web site.
3. Install Nokia S60 5th Edition SDK. To install, go to the Forum.Nokia.com Web site and click 5th Edition in the drop-down list. Only the Emulator option must be selected during installation. The other choices are optional.
4. Run the emulator installer included in the beta release.
· Open a command prompt and navigate to installation folder\Redist\Emulator.
·
Run the command InstS60Emu.cmd S60 SDK root directory. For example:
InstS60Emu.cmd
D:\S60\devices\S60_5th_Edition_SDK_v1.0.
Note: To uninstall, run InstS60Emu.cmd –uninstall S60 SDK root directory.
The SISX installer is Symbian Signed and can be installed on a device without the need for provisioning. A user can use the browser on their device to download and save the runtime on their device, and then install it.
To install the runtime on a device using the browser:
· Open the browser and navigate to a Web site created for Nokia S60 devices using Silverlight for Symbian.
· Click the Get Microsoft Silverlight image.
This downloads the SISX file and automatic installation begins.
· Restart the browser, and visit a site created for Nokia S60 devices.
To install the runtime on a device from your development computer:
· After installing the Microsoft Silverlight for Symbian – Beta Developer Tools, Run the SISX installer from Nokia PC Suite.
-or-
Copy the SISX installer to the device and install from the device.
1. Start the emulator.
To start the Emulator, click Start, point to S60 Developer Tools, and then click Emulator.
2. Open the Silverlight application.
· In the Emulator window, on the File menu, click Open URL, or press CTRL + U.
· In the Open URL dialog box, type the URL containing the sample, and then click OK.
Using the Web browser on the device, browse to the URL containing the sample.
1. Install the required development tools.
· Install Visual Web Developer 2008 Express Edition or Visual Studio 2008 Professional with Service Pack 1
· Install Silverlight 2 Tools for Visual Studio 2008 SP1.
· (Optional) For XAML-based application development, install Microsoft Expression Blend 2 Trial and then install Expression Blend 2 Service Pack 1.
2. Develop the application.
Develop the Silverlight application by using Expression Blend 2, Visual Studio, and/or Visual Web Developer, keeping aware of the S60 limitations described in the companion Platform Limitations document. For information about developing Silverlight applications, see the Microsoft Silverlight Web site.
3. Modify the HTML file.
You must modify the generated HTML file that embeds the <object> tag. This is required because of an issue with the S60 Web browser. Open the generated HTML file in the editor and change
<object
data="data:application/x-silverlight,"
type="application/x-silverlight-2" width="100%" height="100%">
<param name="source"
value="HelloWorld.xap"/>
to
<object data="some_valid_data"
type="application/x-silverlight-2" width="100%"
height="100%">
<param name="source"
value="HelloWorld.xap"/>
The data parameter value of the <object> tag should be modified to a valid resource that the browser can download via HTTP. The resource can be an empty file of size equal to zero bytes. A few examples of valid data values include:
· data=”HelloWorld.xap”
· data=”ZeroByteFile.xap”
Note: This issue is fixed in S60 browser version 7.2.xxxx.
4. To run the application on the emulator, remove the default anchor tag.
You must remove the default anchor tag <a href=”” /> or your application will fail to load on the S60 emulator.
<object
data="data:application/x-silverlight,"
type="application/x-silverlight-2" width="100%"
height="100%">
<param name="source"
value="HelloWorld.xap"/>
<param name="onerror"
value="onSilverlightError" />
<param name="background"
value="white" />
<param
name="minRuntimeVersion" value="2.0.31005.0" />
<param name="autoUpgrade"
value="true" />
<a
href="http://go.microsoft.com/fwlink/?LinkID=124807"
style="text-decoration: none;">
<img
src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get
Microsoft Silverlight" style="border-style: none"/>
</a>
</object>
5. Test the application.
Deploy the Silverlight application to a Web server and then start emulator. On the File menu, click Open URL (CTRL+U) to go to the URL of the Silverlight application.
You must deploy the Silverlight application to a Web server such as a server that is running IIS or a comparable Web server such as Apache.
Note: If you open a Silverlight application directly from a file folder, then network calls in the application will fail.
Download the Silverlight 2 Software
Development Kit (SDK) Documentation to obtain Help documentation for Silverlight for Symbian.
Silverlight for Symbian supports a subset of the
Silverlight 2 features described in the SDK. You can use the Object Browser in Visual Studio to view the types and
members that are present in the mobile assemblies for Nokia devices. In the Object Browser, click Custom
Component Set in the Browse
box, and then click the Edit Custom Component button
(…). Navigate to the assemblies used by the emulator in the following
directory: <emulator-install-folder>\epoc32\winscw\c\system\silverlight.
Some types or members that are present in the
assemblies may not be supported. For detailed information, see the Class Library Support section of the Platform Limitations
document.