What is Firebase Continue?
In the general sense, when leveraged by a developer in their Firebase-enabled Android and/or iOS app(s) and Chrome extension, the Firebase Continue libraries allow users to easily transition from the developer's mobile app(s) to the developer's web app. This transition allows the user to conveniently and nearly instantaneously continue their activity within the mobile app in the web app instead, by means of a Chrome extension.
As an added bonus, the Firebase Continue for iOS library will not only leverage Firebase to allow users to continue their activity within Chrome on any supported platform, but will also make use of Apple Handoff for a more native experience for users with both an iOS device and a macOS computer that are Apple Handoff enabled.
Note: this is not an official Google product.
Example Use Case
For a specific example (which refers to the Firebase Continue samples), if you were to use Firebase Continue for a note writing application called "Continote", a user could begin writing a note on their iOS or Android device using the Continote app while on the bus. Then, they could finish writing it in Chrome on their Windows, macOS, or Linux computer when they return home, without having to manually open the Continote website to find the note there.
Instead, once the mobile app decides the user may wish to continue their current note writing activity elsewhere (either by direct action on the user's part or periodically while writing), the user would receive a prompt within Chrome on their computer (via a Chrome extension using the Firebase Continue library) to continue writing the note there, with one click.
Table of Contents
Please see the README in these subdirectories for specific installation and usage instructions, after following the Initial Setup guide below.
Finally, there is a
file at the root of this repository.
This is the suggested set of Firebase Realtime Database security and validation rules
for use with Firebase Continue. More details on this are provided below in the
Initial Setup guide.
It is important to understand how Firebase Continue works at a high-level before trying to use the libraries.
What is an Activity?
In the context of Firebase Continue, an Activity is something the user may wish to "continue" doing within an application.
For example, an Activity could be writing a note in Continote or watching a video in a video sharing application.
Specifically, an Activity has a URL linking to that "something" that the user may wish to continue doing, and has associated metadata for the libraries to use.
"Continuing" an Activity, then, essentially means opening that URL.
Therefore, to use Firebase Continue, you must be able to codify the state of what you want your users to be able to "continue" doing in URLs.
How do the Firebase Continue libraries work together?
Firebase, of course!
For simplicity, an Activity is always considered immutable, both on the client-side and within the Firebase Realtime Database.
Furthermore, within an application, at most one Activity per user is stored in the database, since only the most recent Activity for a user to "continue" within an application could be relevant.
By design, only Activities performed relatively recently could be relevant to a user. Therefore the metadata of the most recent Activity for a user is used to determine how long ago in the past the Activity was added to the database. From there, the Activity could be deleted if deemed too old to be relevant.
All of these additions to and deletions from the database trigger Firebase events which the Firebase Continue libraries use to provide their functionalities.
After completing the following steps, you will have properly set up your Firebase project to make use of the Firebase Continue libraries:
First, if you have not already done so, either download a copy of this repository from the Releases page to get a stable version of Firebase Continue (including its samples), or clone the repository locally for an unstable, development version.
If you don't already have a Firebase project, create one.
Note that Firebase offers a free plan which you may be able to take advantage of.
sample-firebase-continue-database.rules.jsonfile from the root of this repository and paste a copy of it also at the root.
database.rules.jsonand fill out the clearly marked [TODO: YOUR-VALUE-HERE] details.
Update your Firebase Realtime Database rules to include the rules from the
database.rules.jsonfile you just filled out.
You can now follow the more specific setup guides for each Firebase Continue library you plan on using. These are found in each library's README.
A set of Firebase Continue samples, along with detailed setup instructions,
can be found in the
There is a sample provided for each platform Firebase Continue supports (Android, iOS, and Chrome extensions), as well as a sample web app that includes the suggested Firebase Realtime Database rules after setting up and deploying it to your Firebase project.
Before making any contributions to this repository, please read and follow the steps in CONTRIBUTING.md.