dataconnect/README.md
This quickstart is a movie review app to demonstrate the use of Firebase Data Connect with a Cloud SQL database. For more information about Firebase Data Connect visit the docs.
Follow these steps to get up and running with Firebase Data Connect. For more detailed instructions, check out the official documentation.
If you haven't already, create a Firebase project.
Upgrade your project to the Blaze plan. This lets you create a Cloud SQL for PostgreSQL instance.
Note: Though you set up billing in your Blaze upgrade, you won't be charged for usage of Firebase Data Connect or the default Cloud SQL for PostgreSQL configuration during the preview.
Navigate to the Data Connect section of the Firebase console, click on the "Get Started" button and follow the setup workflow:
us-central1). If you choose a different location, you'll also need to change the quickstart-android/dataconnect/dataconnect/dataconnect.yaml file.dataconnectfdc-sqlfdcdbAllow some time for the Cloud SQL instance to be provisioned. After it's provisioned, the instance can be managed in the Cloud Console.
If you haven’t already, add an Android app to your Firebase project, with the android package name com.google.firebase.example.dataconnect.
Click Download google-services.json to obtain your Firebase Android config file.
Clone this repository to your local machine:
git clone https://github.com/firebase/quickstart-android.git
Move the google-services.json config file (downloaded in the previous step) into the
quickstart-android/dataconnect/app/ directory.
quickstart-android/dataconnect directory in VS Code.In VS Code, open the quickstart-android/dataconnect/dataconnect/moviedata_insert.gql file and click the
Run (local) button at the top of the file.
If you’d like to confirm that the data was correctly inserted,
open quickstart-android/dataconnect/movie-connector/queries.gql and run the ListMovies query.
Press the Run button in Android Studio to run the sample app on your device.