×
Namespaces

Variants
Actions
Revision as of 23:23, 22 July 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Predefined UID attribute must be present in both JAD and JAR files

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): All S60 3rd Edition, Feature Pack 2
Compatibility
Platform(s):
S60 3rd Edition FP2
Article
Created: User:Technical writer 1 (29 May 2008)
Last edited: hamishwillee (22 Jul 2013)

Contents

Overview

In S60 3rd Edition, Feature Pack 2, the predefined UID attribute must be present in the JAD file for MIDlets using the predefined UID when starting the installation from the application descriptor (JAD).

Description

A MIDlet can have a predefined UID attribute in the same way as native executables. Beginning from S60 3rd Edition, Feature Pack 2, this is accomplished using a new JAD/JAR manifest attribute Nokia-MIDlet-UID-<n>, where <n> stands for the MIDlet's number inside the MIDlet suite as with some other attributes.


The UID can be from the following ranges:

0x20000000-0x2FFFFFFF: "protected range", to use this the application must be signed and the attribute must be in the JAR manifest file. The UIDs in this range are requested from Symbian Signed.

0xA0000000-0xAFFFFFFF: "unprotected range", the UIDs in this range should also be requested from Symbian Signed.

0xE0000000-0xEFFFFFFF: "development use range", the UIDs in this range can be used freely but collisions may happen.


However, when the installation of a MIDlet with a predefined UID is started from JAD or JAR Manifest, the actual installation result varies between unprotected and protected ranges (see below). The importance of JAD is here especially highlighted since installation is normally started from JAD.


UIDs from the unprotected range:

  • If the UID is in the JAR Manifest only and installation is started from JAD, installation succeeds but the UID is ignored. With a signed MIDlet, if only the JAD includes the UID and the installation is started from that JAD, the installation fails.
  • When the installation is started from the JAD and the UID is included only in the JAD of an unsigned MIDlet or both in the JAR Manifest & JAD, the installation is successful and the UID is acknowledged. Installation started from the JAR will also be successful if the UID is included in JAR Manifest only.


UIDs from the protected range:

  • If the UID is in the JAR Manifest only and installation is started from JAD, installation succeeds but the UID is ignored; in addition, the UID in JAD only results in failed installation as well as when installing an unsigned MIDlet which has the UID both in the JAR Manifest & JAD (signing is always required for MIDlets which use a UID from the protected range). The failure will also result in JAR installation when the UID is included in JAR Manifest only.
  • If both the JAR Manifest & JAD include the predefined UID and the MIDlet is signed, the installation will be successful and the UID will be acknowledged.


How to reproduce

The problems resulting from having a UID attribute defined either in the JAD or JAR Manifest only can be reproduced as follows:

MIDlet using a UID from the unprotected range:

  • With the UID defined in JAR Manifest only, start the installation from the JAD. The installation is successful but the UID will be ignored.
  • With a signed MIDlet using a UID defined in the JAD only, start the installation from the JAD. The installation fails.

MIDlet using a UID from the protected range:

  • With a signed/unsigned MIDlet using a UID defined in JAR Manifest only, start the installation from the JAD. The installation is successful, but the UID will be ignored.
  • With an unsigned MIDlet using a UID defined in the JAR only, start the installation from the JAR. The installation fails.
  • With a signed MIDlet using the UID defined in the JAD only, start the installation from the JAD. The installation fails.


Solution

Include the UID attribute in both the JAD and JAR MANIFEST files.

This page was last modified on 22 July 2013, at 23:23.
114 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×