Namespaces
Variants
Actions

Archived:RecordStore.AUTHMODE ANY throws NullPointerException on S60 2nd Edition (Known Issue)

Jump to: navigation, search
Archived.png
Archived: 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}}.


Article Metadata

Tested with
Devices(s): Nokia 6680, Nokia 7610

Compatibility
Platform(s): S60 2nd Edition

Article
Created: User:Technical writer 1 (24 Jan 2008)
Last edited: hamishwillee (28 Jun 2012)

Contents

Overview

Using RecordStore.AUTHMODE_ANY in S60 2nd Edition devices throws NullPointerException.

Description

After a RecordStore has been created and the MIDlet tries to set the authorization mode to RecordStore.AUTHMODE_ANY, which defines that other MIDlet suites can have access to the record store, NullPointerException will be thrown. RecordStore.AUTHMODE_PRIVATE defines that only the MIDlet suite which has created the record store can access it.

How to reproduce

The problem can be reproduced with two RecordStore methods, openRecordStore() and setMode().

The following example uses the openRecordStore() method:

RecordStore store;
....
 
try {
store = RecordStore.openRecordStore("TestStore", true, RecordStore.AUTHMODE_ANY, true);
 
if (store!=null)
display.setCurrent(new TextBox("New database", "Database created", 100, TextField.ANY))
 
}
catch (Exception exception) {
display.setCurrent(new TextBox("Failure", exception.toString(), 100, TextField.ANY));
}
 
}

Solution

This problem has been corrected in S60 3rd Edition.

This page was last modified on 28 June 2012, at 08:45.
209 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

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