Nokia Developer Wiki – 2012 wrap up

Coming up to the end of the year it is illuminating to look back at how far we’ve come with the wiki, and to reflect on how much this busy and talented developer community has achieved.

Firstly, the wiki has grown by more than 800 new articles, complementing official library resources with tutorials, tips, innovative real world examples, and buildable code examples. Many existing articles were updated and improved (over 39000+ minor page edits across the wiki), and it was great to see active discussion about articles – with questions and suggestions for improvement increasing significantly (4000+ talk page edits).

The Nokia Lumia/Windows Phone section has (in particular) grown a lot – with more than 450 new articles. We’ve also improved it with a more attractive portal and much better categorisation and navigation. We hope to grow this section even more in the coming year.

There were lots of other changes to the wiki too.

  • We finished adding ArticleMetaData to every wiki article so you can find out more when it was created/edited, and ideally how it was tested and its compatibility
  • A lot more “portals” were added, making it easier to find related topics
  • New articles and translations were added in Chinese, Bahasa Indonesia, and Portuguese
  • The Knowledgebase was merged into the body of the wiki
  • Series 40 and Java entry points were improved and we reviewed a lot of the articles
  • Hundreds of “no longer relevant” articles were Archived. They are still searchable, but don’t appear in results by default

Thank you everyone who contributed. The wordle below shows all community contributors except our hard-working wiki moderation team: lpvalente, chintandave_er, croozeus, kiran10182 and the more than 65+ Nokia employees and summer students who also helped (For week-by-week detail you can check out the page: Wiki contributor of the Week)
Wiki Contributors to wiki in 2012 (except moderators)

Thanks again for making this a really great year for the Nokia Developer Wiki. Best wishes for the holiday season – we’re looking forward to seeing you again next year.

– Hamish Willee (Community Services Manager), on behalf of the Wiki Moderation Team.

Image Scaling Example (Featured Project)

projecticonImage Scaling Example is a Series 40 MIDlet application that demonstrates different image scaling algorithms with their performance and quality. This example scale image size at runtime and uses three different types of image algorithm techniques:

  1.  Linear interpolation
  2.  Bilinear interpolation
  3.  Pixel mixing

imagescaler-1imagescaler-2

This application has been developed with Nokia SDK for Java 2.0 and is fully compatible with Series 40 touch and type,  and full touch devices. To know more about the application flow, implementation, quality, performance and limitations see project wiki.

– Somnath Banik (on behalf of the Projects Moderation team)

Lumin App Labs #4: Create stunning imaging apps for Lumia phones (Featured Video)

The Nokia Lumia 920 with Windows Phone 8 is setting the standard in smartphone-imaging technology. In this Lumia App Lab, you’ll learn about creating stunning imaging apps that use the advancements in the Lumia 920 and the potential of the new Microsoft Windows Phone 8.

You’ll learn how to capture superb images and video, control ISO and other parameters, perform multiframe image capture, get direct access to sensor data, and apply special effects. The Windows Phone 8 native camera app includes a feature called ‘lenses’ that makes it easy for users to apply the effects produced by your apps. The presentation explains how you make your apps part of this seamless user experience.

A downloadable copy of the slide from the session can be found here: http://www.slideshare.net/nokia-developer/lumia-app-labs-create-stunning-imaging-apps-for-lumia-phones

Series 40 UX checklist webinar – companion article (Featured Article)

Series 40 UX checklist webinar – companion article by Krebbix

S40UI checklist 01.png

This article is a companion for the UX Checklist for Series 40 Full Touch webinars held in October and November 2012. It covers both sessions: 31st October 2012 and 1st November 2012.

This webinar provides pointers you can use to perform a basic user experience (UX) check of your Series 40 full-touch app, even if you have no formal experience in UX design. In it we review a list of some of the worst UX mistakes that we found in real-world app testing, and provide some specific solutions to these problems.

Car Trumps (Featured Project)

projecticonCar Trumps is Windows Phone 8 card game for children. This game leverages the use of NFC technology to communicate between two Windows Phone 8 devices. In this game user choose the best feature of a random car and compares the same category to its friend’s car by touching both the devices, and the winner gets both the cards.

car-trumps-main-view car-trumps-card-view

This  application demonstrate the use of ProximityDevice API to transfer data between two devices over the NFC.  The classes, code shipper and the protocol used in this application are noted in project wiki. If you are looking for more information and demo examples on Windows Phone NFC then Opening sockets with NFC could be a good starting point for you.

– Somnath Banik (on behalf of the Projects Moderation team)

Tourist Attractions – use of the Location, In-App Purchase APIs and more (Featured Video)

Tourist Attractions is a Nokia Developer example app written in Java for Series 40 phones. It demonstrates the use of the Location API for Java ME (JSR-179) and the HERE Maps API for Java ME (formerly the Nokia Maps API) to retrieve and show location information as well as details of nearby attractions. In addition, it incorporates the In-App Purchase API to enable the purchase and download of additional city guides.

This application works on most Series 40 phones, ranging from entry-level models to the highly successful Asha family of smartphones.

For downloads, source, and more information, please visit: http://projects.developer.nokia.com/JMETouristAttractions

For more information on in-app purchase, please see:http://www.developer.nokia.com/Resources/Library/Java/#!developers-guides/in-…

For more Java example apps from Nokia Developer, please check out: http://www.developer.nokia.com/Develop/Java/Code_examples/

Drawing shapes with Windows Phone maps API (Featured Article)

Drawing shapes with Windows Phone maps API by symbianyucca

LumiaMaps.pngThis week’s featured article shows how to draw shape objects on a map in Windows Phone applications. Generally you can add polylines, polygons and MapOverlay objects onto the map, however there are no predefined shapes which could be drawn into the map.

The complete source code for the example illustrated in this article can be found from Windows Phone 8 Maps Examples project, the code used here is implemented for example in MoreMapContent example inside that project.

Please try out Windows Phone 8 Maps Examples project and let us know how you like it.

Windows Phone 8 Maps Examples (Featured Project of the Month December 2012)

project iconWindows Phone 8 Maps Examples is a collection of code examples demonstrating the basic Map uses cases on Windows Phone 8. The examples are an evolution/extension of work previously done for other platforms, hosted on the Nokia Developer Wiki.

The map examples cover the following use cases (to list just a few):

  • Basic map with kinetic panning and pinch zooming
  • How different events can be captured, and which events are generated with different map changes
  • Moving to predefined locations
  • Switching different animation modes (parabolic, linear, none)
  • Changing heading, pitch & zoom levels
  • Switching between map color (light/dark) modes & map types (road, Arial, hybrid, terrain)
  • Toggling pedestrian features & landmarks on/off
  • Setting multiple values with setview()
  • Add and remove Markers (MapOverlay), Polyline and Polygon to the Map.
  • Routing
  • Geocoding and reverse geocoding
  • Dynamic polylines
  • Map location and area selectors
  • And many many more …

The author has also created a number of wiki articles documenting some of these examples: Drawing shapes with Windows Phone maps API, Showing/Hiding map content with Windows Phone maps API, Fitting content into the view with Windows Phone maps API, Draggable markers with Windows Phone maps API .

The project and wiki articles are essential viewing for anyone working with maps on Windows Phone 8. If you have any questions or suggestions, please raise them on the project discussion board.

– Hamish Willee (on behalf of the Projects Moderation team)

Mashape API – How to Consume in WP

Today I’ll talk about Mashape APIs and their integration into WP project.  Before getting into more details I’ll like to answer few FAQs.

Q1 : What is Mashape?
Ans: Mashape is API cloud based API hub. You can used hosted API there and can quickly develop an application.

Q2 : How can I use that in WP Application?
Ans: You can consume their API(s) using REST services in WP. (Soon, auto generated client libraries will also be supported for WP code).

Prerequisite:

1. Json Client Library: This library will be helpful to consume Json response from Mashape’s AP. Download the source code and compile it for the WP version you are going to use and then add in your project and use.  

How to consume REST API in Windows Phone

For my sample app I am consuming  QR code generator API.

1. Create a WebClient Request:

WebClient client = new WebClient();

2. Set Content Type in request’s Header:

client.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";

3. Add Authorization Header: An authorization code is required to authenticate each request, this code can be easily generated by a tool provided at this link for all registered Mashape users

client.Headers["X-Mashape-Authorization"] = "YourAutorizationHeaderNeedToGenerateFromTool";

4. Add Data for Web Request:

StringBuilder postData = new StringBuilder();
postData.AppendFormat("{0}={1}", "content", HttpUtility.UrlEncode("TestQRCode"));
postData.AppendFormat("&{0}={1}", "quality", HttpUtility.UrlEncode("L"));
postData.AppendFormat("&{0}={1}", "type", HttpUtility.UrlEncode("text"));
postData.AppendFormat("&{0}={1}", "size", HttpUtility.UrlEncode("5"));

5. Create Mashape API’s URI: This URI responsible to call a specific API listed in Mashape cloud listing. You can get the URL from Mashape site as shown here

var uri = new Uri("https://mutationevent-qr-code-generator.p.mashape.com/generate.php?", UriKind.Absolute);

6. Register a Asyn Call Completed Event:

client.UploadStringCompleted += new UploadStringCompletedEventHandler(client_UploadStringCompleted)

7. Make Async http Call:

client.UploadStringAsync(uri, "POST", postData.ToString());

8. Consume Response in completed event:

void client_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
{
var client = sender as WebClient;
client.UploadStringCompleted -= client_UploadStringCompleted;
string response = string.Empty;
if (!e.Cancelled)
{
response = HttpUtility.UrlDecode(e.Result);
}
}

You are done!!!

A full working sample can be found at the links given below.

Source Code: WP7, WP8