×
Namespaces

Variants
Actions

Nokia Maps API for Java ME cannot be used on Nokia C2-03 (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.


Contents

Overview

Nokia Maps API for Java ME cannot be used on Nokia C2-03 and the following error is thrown: Runtime java/lang/RuntimeException Copyright not available.

Description

A java application that uses the Nokia Maps API for Java ME to display a simple Map of the Globe throws the exception as described in the overview when it is launched and crashes. The only available option then is to Quit the application.

How to reproduce

The code below attempts to display a Map centered around Rome, Italy

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import com.nokia.maps.map.MapCanvas;
import com.nokia.maps.common.GeoCoordinate;
import com.nokia.maps.map.MapDisplay;
 
public class MapDisplayMIDlet extends MIDlet {
 
MapCanvas mapCanvas = null;
MapDisplay mapdisplay;
GeoCoordinate geo; //the coordinates of the map's center
 
protected void startApp() throws MIDletStateChangeException {
 
Display display = Display.getDisplay(this);
 
mapCanvas = new MapCanvas(display);
mapdisplay = mapCanvas.getMapDisplay();
 
//Gets the coordinates for Rome, Italy
geo = new GeoCoordinate(41.90311, 12.49576, 0.0f);
//Sets the center of the map to the given coordinates
mapdisplay.setCenter(geo);
 
display.setCurrent(mapCanvas);
}
 
protected void destroyApp(boolean unconditional)
throws MIDletStateChangeException {
 
}
 
protected void pauseApp() {
 
}
}

The source code above can be downloaded from here: Media:MapDisplayMIDletSource.zip

The installation files for the source code above can be downloaded from here: Media:MapDisplayMIDletBinaries.zip

The following steps are needed in order to reproduce this error:

  1. a Nokia C2-03 should be used
  2. a proper data package connection should be active

Actual Result

The MIDlet crashes with the following Exception upon launch: Runtime java/lang/RuntimeException Copyright not available

Expected Result

The application should request permission to connect to the internet and eventually a Map centered around Rome, Italy should be displayed.

Affected Devices

This error affects Nokia C2-03.

Solution

A workaround exists, in that the phone will connect traffic when using the China server ApplicationContext.setChina(true)

Article Metadata
Code ExampleTested with
Devices(s): Nokia C2-03
Compatibility
Platform(s): Series 40
Article
Keywords: Nokia Maps, Java ME, Java, C2-03, Exception, error, problem, issue
Created: skalogir (24 Feb 2012)
Last edited: hamishwillee (25 Jun 2013)
This page was last modified on 25 June 2013, at 06:42.
68 page views in the last 30 days.
×