📐
Thunkable Docs
Build an AppDrag and Drop DocsSnap to Place Docs
Snap to Place
Snap to Place
  • 👋Welcome to Thunkable Docs
  • 👶Getting Started
    • Signing In
    • Your Thunkable Projects Page
    • Tutorials
    • Live Test your App
  • 🆕Create New Project
    • Project Settings
    • Project Assets and Sizes
  • Thunkable Sample Projects
  • Public Gallery of Projects
  • 🛠️ Components
  • 🔘User Interface
  • Button
  • Label
  • Text Input
  • List Viewer
  • Web Viewer
  • Switch
  • Slider
  • Alert
  • Loading Icon
  • Date Input
  • Time Input
  • PDF Reader
  • Rating
  • 📊Data Viewers
  • Data Viewer List
  • Data Viewer Grid
  • Custom Data Viewer Layout
  • Data Sources
  • 📐Layout
  • Top Tab Navigator
  • Bottom Tab Navigator
  • Stack Navigator
  • Drawer Navigator
  • Screen
  • Row
  • Column
  • 📷 Image
  • Image
  • Photo Library
  • Camera
  • Barcode Scanner
  • Image Recognizer
  • Animation by Lottie
  • Video
  • Video Recorder
  • 🗄️ Data
  • Local Storage
  • Local DB
  • Realtime DB by Firebase
  • Airtable
  • Media DB by Cloudinary
  • File Picker
  • Web API
  • 🌍Location
  • Maps by Google and Apple
  • Location Sensor
  • 💲Monetization
  • Ads by AdMob
  • In-App Purchase
  • 🌐Sensors
  • Gyroscope
  • Magnetometer
  • Accelerometer
  • Timer
  • Bluetooth Low Energy
  • 🔊Voice
  • Sound
  • Text to Speech
  • Speech Recognizer
  • Translator
  • Audio Recorder
  • 🤝Social
  • Share
  • Email Sign In by Firebase
  • Push Notifications by One Signal
  • 🎮Gaming
  • Canvas
  • Sprites
  • Sprite Gallery
  • Canvas Label
  • 🤖Gaming Blocks🎮
  • Events
  • Motion
  • Looks
  • Direction
  • Sensing
  • Add & Remove
  • Stage
  • Canvas Label
  • 🤖Blocks
  • Control
  • Logic
  • Math
  • Text
  • Lists
  • Color
  • Objects
  • Device
  • Variables
  • Functions
  • "Any Component" Blocks
  • 🖥️ App Services & Emulators
  • 🔒App Data Privacy
  • ➕Make Copy
  • 📥Download
  • 📤Share
  • 📱Publish
  • Publish to App Store (iOS)
    • TestFlight Overview
      • TestFlight in Depth
  • Publish to Play Store (Android) with AAB
  • Publish as a Web App
  • Generate Screenshots
  • 🔎Troubleshooting
    • Login Issues
    • FAQs
  • 📏Intro to Spacing
  • 🖼️ Intro to Sizing
  • 🔤Fonts
  • 💾Managing Storage
  • 📝Bugs and Product Feedback
  • Snap to Place Hour of Code Videos
Powered by GitBook
On this page
  • Realtime DB Overview
  • Set up Your Own Firebase account
  • Create your free Firebase project and account
  • Edit Database Rules
  • Connect Your Firebase Project with Thunkable
  • Test Save to your Database
  • Save Data
  • Get Data
  • Update Data in Real-time
  • Separating Your Data into Project Buckets

Was this helpful?

Export as PDF

Realtime DB by Firebase

PreviousLocal DBNextAirtable

Last updated 2 years ago

Was this helpful?

Realtime DB Overview

You should now use instead of adding a Realtime DB component. This will work the same way in the background but will save you a lot of blocks.

We highly recommend you use your own Firebase account with your app. With the increased focus on user privacy, we strongly advise that you use own Firebase account both to ensure the privacy of your user data and to give you visibility into the database itself. We provide our database for your convenience but we may also clean out our shared account periodically

This storage option is useful for anything from saving game high scores to tracking work credit, powered by Firebase.

Set up Your Own Firebase account

Thunkable provides a default Firebase account for testing purposes. When your app is ready to be distributed, we strongly advise connecting your app to your personal Firebase instance.

Firebase Realtime Database also pairs well with and you can use a single Firebase project for both services.

Create your free project and account

Edit Database Rules

Otherwise, you will need to set your Read and Write rules to true

Connect Your Firebase Project with Thunkable

To connect your Firebase project with Thunkable, you'll have to add an API key and Database URL to the Firebase Settings in the App Settings, which you can find by clicking on your app icon

One way to retrieve the API key and Database URL from Firebase is to click on the Add Firebase to your web app option

Test Save to your Database

Once your project is connected to your Thunkable app, we recommend that you do a simple test and save a value into your database. It should appear in your data tab in your Firebase console.

Save Data

Event

Description

Save (key, value)

Asks Firebase to save a given value under the given key

Get Data

Event

Description

Get (key,value)

Asks Firebase to get thevaluestored under the givenkey

Update Data in Real-time

Event

Description

Add Listener (key)

Asks Firebase to listen to a specifickeyfor changes in the database. Required for Data Changed block.

Data Changed (key,value)

Asks Firebase for updates tovaluefor specifiedkey. Requires an Add Listener block.

Remove Listener (key)

Ask Firebase to stop listening to a specifickeyfor changes in the database

Separating Your Data into Project Buckets

If you are using powered by Firebase in your app, you do not need to edit the default database rules which permit reading and writing to the database for authorized users.

You might want to split your database into smaller spaces, also known as project buckets. To do this, you would need to save your value as an object and use the create object block to create your project bucket. More details in .

Sign In
this post
Sign in
Firebase
cloud variables
Thanks to our power Thunker @actech for this awesome tip!