avatarNine Pages Of My Life

Summarize

How to add data collections to your Cloud Firestore?

Create your firebase project, check out this blog for detail steps:

Let’s create a Database

Follow the steps:

Set your rules for acessing your database:

Add your data collections:

Let’s create a Users data collection in our example:

Note* Click Auto-ID to generate the Document ID

Finally you have your data collection:

Now for changing the rules of database for testing purpose:

Go in -> Rules

For development:

Change allow read, write: if false; -> allow read, write: if true;

Note: It’s quick solution for development purpose only because it will turns off all the security. So, it’s not recommended for production.

For production:

If authenticated from firebase: Change allow read, write: if false; -> allow read, write: if request.auth != null;

Thanks;)

Firebase
Firestore
Android
Android App Development
Kotlin
Recommended from ReadMedium