Sketchware Docs (Unofficial)
  • Introduction (Under Construction)
  • Official Docs
  • Introduction to Sketchware
    • Adding your app
    • Designing and Programming your app
  • Widgets and Layouts
    • Concept
    • Properties
    • List of Widgets and Layouts
  • Events
  • Blocks
    • Variable
    • List
    • Control
    • Operator
    • Math
    • File
    • View
    • Component
    • More Block
  • Components
    • About Components
    • Intent
    • SharedPreference
    • Calendar
    • Vibrator
    • Timer
    • Dialog
  • Configuration
  • AdMob Guide
  • Community
Powered by GitBook
On this page
  • Basic Example
  • Blocks
  • getData
  • setData
  • removeData

Was this helpful?

  1. Components

SharedPreference

Shared Preference is used to locally save data on the device. (This page is cloned from the official docs)

PreviousIntentNextCalendar

Last updated 4 years ago

Was this helpful?

Basic Example

Using setData block to save a value of Value with the key KeyName.

You can think of the key as the file name, and the value as the contents of that file.

Blocks

getData

Retrieve the data saved at the specified key.

setData

Save data to the specified key with a specified value.

removeData

Remove the data at the specified key.

getData
setData
removeData