You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dataconnect/README.md
+24-32Lines changed: 24 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,11 @@ For more information about Firebase Data Connect visit [the docs](https://fireba
11
11
Follow these steps to get up and running with Firebase Data Connect. For more detailed instructions,
12
12
check out the [official documentation](https://firebase.google.com/docs/data-connect/quickstart).
13
13
14
+
### 0. Prerequisites
15
+
- Latest version of [Android Studio](https://developer.android.com/studio)
16
+
- Latest version of [Visual Studio Code](https://code.visualstudio.com/)
17
+
- The [Firebase Data Connect VS Code Extension](https://marketplace.visualstudio.com/items?itemName=GoogleCloudTools.firebase-dataconnect-vscode)
18
+
14
19
### 1. Connect to your Firebase project
15
20
16
21
1. If you haven't already, create a Firebase project.
@@ -35,28 +40,26 @@ check out the [official documentation](https://firebase.google.com/docs/data-con
35
40
4. Allow some time for the Cloud SQL instance to be provisioned. After it's provisioned, the instance
36
41
can be managed in the [Cloud Console](https://console.cloud.google.com/sql).
37
42
38
-
5. If you haven’t already, add an Android app to your Firebase project, with the android package name `com.google.firebase.example.dataconnect`. Download and then add the Firebase Android configuration file (`google-services.json`) to your app:
39
-
1. Click **Download google-services.json** to obtain your Firebase Android config file.
40
-
2. Move your config file into the `quickstart-android/dataconnect/app` directory.
41
-
42
-
### 2. Set Up Firebase CLI
43
-
44
-
Ensure the Firebase CLI is installed and up to date:
43
+
5. If you haven’t already, add an Android app to your Firebase project, with the android package name `com.google.firebase.example.dataconnect`.
44
+
Click **Download google-services.json** to obtain your Firebase Android config file.
45
45
46
-
```bash
47
-
npm install -g firebase-tools
48
-
```
49
-
50
-
### 3. Cloning the repository
51
-
This repository contains the quickstart to get started with the functionalities of Data Connect.
2. Move the `google-services.json` config file (downloaded in the previous step) into the
54
+
`quickstart-android/dataconnect/app/` directory.
55
+
56
+
### 3. Open in Visual Studio Code (VS Code)
57
+
58
+
1. Open the `quickstart-android/dataconnect` directory in VS Code.
59
+
2. Click on the Firebase Data Connect icon on the VS Code sidebar to load the Extension.
60
+
a. Sign in with your Google Account if you haven't already.
61
+
3. Click on "Connect a Firebase project" and choose the project where you have set up Data Connect.
62
+
4. Click on "Start Emulators" - this should generate the Kotlin SDK for you and start the emulators.
60
63
61
64
### 4. Deploy the service to Firebase and generate SDKs
62
65
@@ -74,24 +77,13 @@ This repository contains the quickstart to get started with the functionalities
74
77
firebase dataconnect:sdk:generate
75
78
```
76
79
77
-
### 5. Populating the database
78
-
1. Run `1_movie_insert.gql`, `2_actor_insert.gql`, `3_movie_actor_insert.gql`, and `4_user_favorites_review_insert.gql` files in the `./dataconnect` directory in order using the VS code extension,
80
+
### 5. Populate the database
81
+
In VS Code, open the `quickstart-android/dataconnect/dataconnect/data_seed.gql` file and click the
82
+
`Run (local)` button at the top of the file.
83
+
84
+
If you’d like to confirm that the data was correctly inserted,
85
+
open `quickstart-android/dataconnect/connectors/queries.gql` and run the `ListMovies` query.
79
86
80
87
### 6. Running the app
81
88
82
89
Press the Run button in Android Studio to run the sample app on your device.
83
-
84
-
## 🚧 Work in Progress
85
-
86
-
This app is still missing some features which will be added before Public Preview:
87
-
88
-
- [ ] Search
89
-
- [ ] Movie review
90
-
- [x] Add a new review
91
-
- [ ] Update a review
92
-
- [ ] Delete a review
93
-
- [x] Actors
94
-
- [x] Show actor profile
95
-
- [x] Mark actor as favorite
96
-
- [ ] Error handling
97
-
Some errors may cause the app to crash, especially if there's no user logged in.
0 commit comments