Sketchware

Sketchware

  • Docs
  • Community
  • Blog

›Components

The Basics

  • Getting Started
  • Creating a New Project
  • Designing Your App
  • Programming Your App
  • Adding Components
  • Adding Resources

Firebase

  • Getting Started
  • Linking Android App
  • Project Settings
  • Setting Database Rules
  • Enabling Login Methods
  • Enabling Firebase Storage

AdMob

  • Getting Started
  • Creating Ad Unit
  • Sketchware AdMob Settings

Publishing

  • Getting Started
  • Creating a Service Account
  • First Time Publishing

Components

  • Intent
  • SharedPreference
  • Calendar
  • Vibrator
  • Timer
  • Dialog
  • MediaPlayer
  • SoundPool
  • ObjectAnimator
  • Camera
  • FilePicker
  • Gyroscope
  • Firebase DB
  • Firebase Auth
  • Firebase Storage

SharedPreference

Shared Preference is used to locally save data on the device.

Example

Using setData block to save a value of someValue with the key someKey.

example



Blocks

getData

Retrieve the saved data.

get data

TypeExplanationRequired
Shared PreferenceShared Preference ComponentYes
StringKey of the value you are trying to retrieveYes

setData

Save data with the key value pair.

set data

TypeExplanationRequired
Shared PreferenceShared Preference ComponentYes
StringKey valueYes
StringValue you are trying to saveYes

removeData

Remove the data with the key value.

remove data

TypeExplanationRequired
Shared PreferenceShared Preference ComponentYes
StringKey of the value you are trying to deleteYes
← IntentCalendar →
  • Example
  • Blocks
    • getData
    • setData
    • removeData
Sketchware
Docs
Getting Started
Community
FacebookSlack
More
BlogMedium
Copyright © 2018 Sketchware