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

Firebase DB

Firebase DB is an online, real-time database used to store and read data.

Example

Creating and saving a post information on Firebase Database.

example



Blocks

add key value

Add data to Firebase Database with key-value format.

add key value

TypeExplanationRequired
Firebase DatabaseFirebase Database ComponentYes
StringKey of the value you are trying to saveYes
MapMap of valuesYes

push value

Push data to Firebase Database with a generated unique random key.

push value

TypeExplanationRequired
Firebase DatabaseFirebase Database ComponentYes
MapMap of valuesYes

push getKey

Generate a unique random key.

get key

TypeExplanationRequired
Firebase DatabaseFirebase Database ComponentYes

delete key

Delete the data from the Databse with the given key.

delete key

TypeExplanationRequired
Firebase DatabaseFirebase Database ComponentYes
StringKey of the value you are trying to deleteYes

get children to then

Retrieve the value to List Map, then perform additional action.

get children to then

TypeExplanationRequired
Firebase DatabaseFirebase Database ComponentYes
List MapList Map variableYes

start listening

Start listening to changes in the database. The component starts listening by default. Only used after stopping the listener.

start listening

TypeExplanationRequired
Firebase DatabaseFirebase Database ComponentYes

stop listening

Stop listening to the changes in the database.

stop listening

TypeExplanationRequired
Firebase DatabaseFirebase Database ComponentYes

Events

onChildAdded

Triggered when a new child value is added.

onChildChnaged

Triggered when any value in children has changed.

onChildRemoved

Triggered when a child is removed from reference.

onCancelled

Triggered when any read or write action is cancelled.

← GyroscopeFirebase Auth →
  • Example
  • Blocks
    • add key value
    • push value
    • push getKey
    • delete key
    • get children to then
    • start listening
    • stop listening
  • Events
    • onChildAdded
    • onChildChnaged
    • onChildRemoved
    • onCancelled
Sketchware
Docs
Getting Started
Community
FacebookSlack
More
BlogMedium
Copyright © 2018 Sketchware