Skip to content

Cordova plugin for Android's Native key value storage system.

Notifications You must be signed in to change notification settings

rehy/cordova-plugin-shared-preferences

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova Plugin for Android SharedPreferences

Installation

cordova plugin add cordova-plugin-shared-preferences --save

Usage

document.addEventListener('deviceready', () => {
  const prefs = window.plugins.SharedPreferences
  prefs.getSharedPreferences('shared_preferences', 'MODE_PRIVATE', () => {
    prefs.putString('pref_key', 'some text')

    prefs.getString('pref_key', (value) => {
      alert(value)
    }, (error) => {
      // handle error
    })
  }, (error) => {
    // handle error
  })
}

About

Cordova plugin for Android's Native key value storage system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published