开发者

What Information can a Nokia WRT Widget have access to on the Device?

开发者 https://www.devze.com 2022-12-11 00:36 出处:网络
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 t

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 widg开发者_如何转开发et 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?


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.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消