views:

309

answers:

3

I intend to store a unique ID on every device that accesses a web service through a Nokia Web Runtime Widget. Now I know that these Widgets cannot Read/Write files on the devices so its not possible to have that id stored on the device.

Is there someone who can figure a way around this? I thought of having the widget get the IMEI number as an alternative and have the users usage info stored on the Server as an alternative or something like that but I am not sure whether the widget can get this information.

So my other question is, what methods would you use to store persistent/session data in general while using Nokia's WRT and does the Widget have access rights to retrieve the device's IMEI?

+1  A: 

You can indeed retrieve the IMEI in WRT, as this article shows.

I do believe you can't rely on any local storage in WRT.

The web browser caching mechanism is supposed to avoid your widget having to re-download data over and over again.

QuickRecipesOnSymbianOS
Apparently there doesn't seem to be a way to get the IMEi number using WRT 1.0 as the articles are specific to WRT 1.1
Steve Obbayi
+1  A: 

It is possible to save persistent data in WRT by using the method setPreferenceForKey(). Check this article for example.

As of WRT system access, it can access standard applications such as Calendar, Contacts, Logs, SMS, MMS, it has access to device location, some system information and sensors on device.

How to retrieve IMEI? Here is the example.

MannyNS
A: 

Indeed, the setPreferenceForKey() / getPreferenceForKey() -function pair provides some persistent storage, but the memory allocated is pretty limited and exceeding the limitations will crash your widget horribly.

Here's the entire API reference for the WRT API: http://library.forum.nokia.com/index.jsp?topic=/Web_Developers_Library/GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81.html

Tommi Forsström