Code Examples

Explore code examples

These code examples demonstrate how to implement important mobile use cases on Nokia devices; and they provide complete, installable applications with full source code. By comparison, code snippets are short blocks of code that developers can easily use in their applications. Code examples are published in this Code Examples section of the website, and code snippets are available in the Nokia Developer Wiki.

Latest code examples

08 February 2012
Compass v2.1

Compass v2.1

Compass is a Nokia showcase example application that demonstrates the use of the Qt Location API and Nokia Maps with the compass sensor. This application can be used as a traditional compass with Nokia Maps and it allows the user to determine the bearing to the desired direction. The tracking function draws the travelled route to the map and the route can be saved in KML format. This example is hosted in a Nokia Developer Project, where you can find implementation notes, discover recent revisions, and contribute to the project.

23 January 2012
Beta Labs Client v1.1

Beta Labs Client v1.1

This Qt Quick application allows users to browse the applications in Nokia Beta Labs. The main purpose of the application is to demonstrate how to communicate with a web server from QML using AJAX. The application also demonstrates how to create the user interface using multiple QML views and use the Qt Quick Components. This example is hosted in a Nokia Developer Project, where you can find additional documentation, discover recent revisions, and contribute to the project.

12 January 2012
Weekly Planner Silverlight v1.2

Weekly Planner Silverlight v1.2

This example application demonstrates how to build custom user interface controls for Windows Phone 7 using Microsoft Silverlight. This example is hosted in a Nokia Developer Project, where you can find implementation and porting notes. The application has been co-developed with the Weekly Planner for Qt application. Version 1.2 of the application has been improved based on received feedback.

03 January 2012
Weather App

Weather App

WeatherApp is a simple location-based weather application using the WorldWeatherOnline service for weather and location search data. The application uses the org.json.me library for parsing JSON. It has been designed to work on various Series 40 devices with different form factors and input methods. This example is hosted in a Nokia Developer project, where you can find the implementation notes.

29 December 2011
Weather Forecast

Weather Forecast

Weather Forecast is a Nokia Developer example application ported from Windows Phone to Qt. This simple Qt Quick application parses the weather forecast content from XML data retrieved over the network. The application features an animated splash screen. This example is hosted in Nokia Developer Projects, where you can find implementation and porting notes, discover recent revisions, and contribute to the project.

29 December 2011
Weekly Planner v1.2

Weekly Planner v1.2

The Weekly Planner example application demonstrates the use of the Pivot-type custom-made QML element. This example application is hosted in Nokia Developer Projects where you can also find implementation notes.

22 December 2011
Diner v1.5

Diner v1.5

The Diner example application demonstrates how QML can be used to build a simple, impressive catalog-type application based on local XML data. The updated application uses Qt Quick Components. This example is hosted in a Nokia Developer Project, where you can also find implementation notes, discover recent revisions, and contribute to the project.

21 December 2011
RSS Reader v1.4

RSS Reader v1.4

This example demonstrates the creation of a rich, list based UI with view navigation, search, accordion list, and animations. The UI is built by making extensive use of Qt Quick Components and all components are designed to be reusable in other applications. The list content is populated from RSS feeds. The user can subscribe to additional RSS feeds and subscription information is held in QML local storage. The example also demonstrates how an application's graphical theme can be switched from the settings view.

This version adds support for the Nokia E6 as well as including UI fine tuning and some refactoring.

This example is hosted in a Nokia Developer Project, where you can find the implementation notes.

19 December 2011
Battleships

Battleships

Battleships is a Qt Quick example game of the well-known guessing game played by two people. In this game you have to guess where your opponent's battleships are on the 10 x 10 grid and sink them before the opponent sinks your ships. The game has both single player and two-player modes. In the two-player mode two devices are connected over a Bluetooth connection. This example is hosted in Nokia Developer Projects, where you can find implementation notes, discover recent revisions, and contribute to the project.

29 November 2011
Drumkit

Drumkit

Drumkit is a virtual drumkit that lets you play percussion sounds by tapping sound pads, recording the beats, and playing them back. This example is hosted in Nokia Developer Projects, where you can find implementation notes, discover recent revisions, and contribute to the project.

29 November 2011
Drumkit XNA v1.1

Drumkit XNA v1.1

Drumkit XNA is a virtual drumkit that lets you play percussion sounds by tapping sound pads. The application contains two views for playing, a simple view with 2D pads and a 3D drumkit view. You can record your beats and play them back afterwards. It is also possible to play the drums on top of your last recording. The application has been developed purely on top of XNA. The application has been ported from the MIDP: Java Drumkit Example. At the same time, also a Qt version has been developed for Symbian devices and the Nokia N9. Drumkit XNA is hosted in Nokia Developer Projects, where you can find implementation notes, discover recent revisions, and contribute to the project.

17 November 2011
RentBook

RentBook

This Nokia Developer example application demonstrates the use of Qt Quick Components and the SQLite database for keeping track of items for rent. RentBook alows the user to add items for rent into a database and, for example, keep track of whom the item is rented to on a certain date. The Symbian version follows the Symbian design guidelines. This example is hosted in a Nokia Developer Project, where you can find implementation notes, discover recent revisions, and contribute to the project.

16 November 2011
Moto Trial Racer v1.2

Moto Trial Racer v1.2

Moto Trial Racer is a motorcycle racing game that demonstrates integrating QML with Box2D physics engine. The game uses Box2D QML plug-in as a base, but the plug-in has been modified to fit for this game. The audio implementation in the game is provided by Qt GameEnabler. The example also features in-application purchasing. The user can purchase items from the Nokia Store to enhance the game experience. The actual items are provided already in the installation but are protected by DRM (Digital Rights Management) and can only be unlocked by Nokia Store. This example is hosted in a Nokia Developer Project, where you can find implementation notes, discover recent revisions, and contribute to the project.

16 November 2011
QuickHit v2.0

QuickHit v2.0

This Nokia Developer example application demonstrates the use of Qt Quick as a game platform. QuickHit is essentially a basic shooting game, but differentiated from other such games by its levels. The levels are Qt plug-ins which are loaded during QuickHit startup. IAP (In-Application-Purchase) features were added to the 2.0 version of the game. New levels can now be purchased from the Nokia Store. This example demonstrates the use of non-DRM purchasing. The levels to purchase are not bundled in the original installation but downloaded from a back-end server once payment has been made. This example is hosted in a Nokia Developer Project, where you can find implementation notes, discover recent revisions, and contribute to the project.

16 November 2011
Space Blok Qt v1.2

Space Blok Qt v1.2

Space Blok Qt is a 1-4 player game for Qt devices and desktop, where the players use marbles to break a 3D block structure. The game is implemented with Qt3D and Qt Quick and it utilises an open source physics engine, Bullet Physics Library. The application has been ported from Space Blok XNA for Windows Phone. This example is hosted in a Nokia Developer Project where you can find implementation and porting notes. Watch a video about this example application.

Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2012 All rights reserved