Note that adding Firebase to your C++ project involves tasks both in the
Firebase console and in your open C++ project (for example, you download
Firebase config files from the console, then move them into your C++ project).

Setting up public access

The Realtime Database provides a declarative rules language that allows you to
define how your data should be structured, how it should be indexed, and when
your data can be read from and written to. By default, read and write access
to your database is restricted so only authenticated users can read or write
data. To get started without setting up Authentication, you can
configure your rules for public access.
This does make your database open to anyone, even people not using your app,
so be sure to restrict your database again when you set up authentication.

Create and initialize firebase::App

Before you can access the Realtime Database, you'll need to create and initialize the
firebase::App.

You only need to initialize firebase::App once, no matter
how many Firebase C++ features you use.

Include the header file for firebase::App:

#include "firebase/app.h"

Android

Create the firebase::App, passing the JNI environment and a jobject
reference to the Java Activity as arguments:

Next Steps

Known Issues

On desktop platforms (Windows, Mac, Linux), the Firebase C++ SDK uses
REST to access your database. Because of this, you must
declare the indexes you use
with Query::OrderByChild() on desktop or your listeners will fail.

The desktop workflow version of Realtime Database does not support offline or
persistence.