Languages

Menu
Sites
Language
SharedPrerence or system property in tizen

Hi expert.

I'm a newbie in tizen and looking for same api to sharedPreference or system property in android.

Where can I find it?

Thank you.

Responses

5 Replies
daniel kim

Hi,

You can use Web Storage API to save some user data in your application.

Please refer to this link which has more details.

     https://developer.tizen.org/documentation/articles/html5-local-storage

I wish this will help you.

 

Seoghyun Kang

Hello,

 

Please refer the LocalStorage sample code. It is very easy.

 

// Store
localStorage.setItem("ver", "1.0");

// Retrieve
ver = localStorage.getItem("ver");

 

By the way, I think it is also good way to use the JSON data.

AVSukhov

Hello,

You can use Web Storage API:

http://www.w3.org/TR/webstorage/

or Widget Preferences attribute:

http://www.w3.org/TR/widgets-apis/#the-preferences-attribute

Vikram

regarding widget preference

sample code:

    widget.preferences.setItem('my_info', 'hello my!');

    alert('msg:' + widget.preferences.getItem('my_info'));

AVSukhov

Hello,

Also, you can specify widget preferences in config.xml on Preferences tab (and set read-only attribute)