create account

Firebase Firestore | Android App Development | Lecture#53 | Hive Learners by faisalamin

View this thread on: hive.blogpeakd.comecency.com
· @faisalamin ·
$22.56
Firebase Firestore | Android App Development | Lecture#53 | Hive Learners
<center><h2>𝓖𝓻𝓮𝓮𝓽𝓲𝓷𝓰𝓼</h2></center>
<div class="text-justify">

Dear Hive Learners In [lecture 52](https://ecency.com/@faisalamin/intro-screen-or-android-app/edit) we complete the intro screen in our app. Today we are going to learn a Firebase database type that is Firestore. This database helps us to sync the data and it can store the data for offline use. It is very useful for the data that do not change in real-time or change after a long time. We can keep the data in the cache which reduce the usage of using mobile data also the data can be viewed offline.

![](https://images.ecency.com/DQmXWUquMbtu86v5TStJeLbAfZedCTkGuuE4vYn1o7RJ4k9/multi_purpose_1_.png)


## [GitHub Link](https://github.com/faisalamin9696/HiveLearners2)

Use this GitHub project to clone into your directory. The following lecture will update it so you will never miss the latest code. Happy Coding!

## What Should I Learn

- What is Firestore
- How to configure it in our project.

## Assignment

- Configure Firebase Firestore in your project

## Procedure

With the help of Firebase assistance, we will add the Firebase Firestore dependencies to our project. Follow this step to open the Firebase Assistance. Make sure you log in to Firebase using your google account and that Project is connected with a firebase account.

![](https://images.ecency.com/DQmQVNmAjFSMwAPFXxVnZc1L6qL6NVwSwxoDLy5oYGGNBdw/image.png)

Open the Firebase Firestore section and click on Get Started. Connect your app if it is showing not connected. 

Now click on the button ```Add the Cloud Firestore SDK to your app```

![](https://images.ecency.com/DQmbF9d5E71zuveDdBRVnDs3SqVzkRp9Sb2RjRiYg2iat6C/image.png)

Click on ```Accept Changes `` and wait for the project to sync. If you got any errors then you can send them in the comment section we will resolve them as soon as possible.

![](https://images.ecency.com/DQmPcMmxC1YnSebcAoXZyoPvc3R9LchqGZoiognNZphubGY/image.png)


When it is synced successfully it will show the ```Dependencies set up correctly``` message.

![](https://images.ecency.com/DQmNum6GgiA6xgBG5DbpbVcusHS8Zy7EcrXR2kcn4ADgEnj/image.png)

Now we can declare and initialize the Firestore in our app. We will change the real-time database code with the Firestore code in the next lecture. Let's declare and initialize the variables in the Transfers_Fragment.java.

![](https://images.ecency.com/DQmV1LbYvsA1bTarKSASDjQWtSFnLGmDdXBAEa6HXkWhARo/image.png)

This is how we can send data to the Firestore. Here the parent is called Collection and the child is called document. We can store any data type in the document. A collection can have more than one document and a document can have more than one value.</div>

![](https://images.ecency.com/DQmdWTFyDLnpKUsrBrwSwGLv4RSZQ89nozP7HnhiH7ta4hN/image.png)

<center>
![hl_divider.png](https://images.ecency.com/DQmabQycJhW8DT8a634z3wQaVXvPZ5KMii2LYbaWZ3PsaRy/hl_divider.png)

<h2>Thank You</h2>

![hl_footer_banner.png](https://images.ecency.com/DQmZ4HF3hjV4HwJXuw8vRJ6B6CiMC3kUkkoihjtm7z2Gii7/hl_footer_banner.png)
<div class="pull-left"><a href="https://discord.gg/7Bzqv4qUMT">
<img src="https://cdn.steemitimages.com/DQmXd6PwGUHRgSDkWtwKfDvdFpaLHXvXBdK7wnYZeqe1GUa/discord_animation_logo.gif"/></a>
</center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 287 others
properties (23)
authorfaisalamin
permlinkfirebase-firestore-or-android-app
categoryhive-153850
json_metadata"{"links": ["https://ecency.com/@faisalamin/intro-screen-or-android-app/edit", "https://github.com/faisalamin9696/HiveLearners2", "https://discord.gg/7Bzqv4qUMT"], "image": ["https://images.ecency.com/DQmXWUquMbtu86v5TStJeLbAfZedCTkGuuE4vYn1o7RJ4k9/multi_purpose_1_.png", "https://images.ecency.com/DQmQVNmAjFSMwAPFXxVnZc1L6qL6NVwSwxoDLy5oYGGNBdw/image.png", "https://images.ecency.com/DQmbF9d5E71zuveDdBRVnDs3SqVzkRp9Sb2RjRiYg2iat6C/image.png", "https://images.ecency.com/DQmPcMmxC1YnSebcAoXZyoPvc3R9LchqGZoiognNZphubGY/image.png", "https://images.ecency.com/DQmNum6GgiA6xgBG5DbpbVcusHS8Zy7EcrXR2kcn4ADgEnj/image.png", "https://images.ecency.com/DQmV1LbYvsA1bTarKSASDjQWtSFnLGmDdXBAEa6HXkWhARo/image.png", "https://images.ecency.com/DQmdWTFyDLnpKUsrBrwSwGLv4RSZQ89nozP7HnhiH7ta4hN/image.png", "https://images.ecency.com/DQmabQycJhW8DT8a634z3wQaVXvPZ5KMii2LYbaWZ3PsaRy/hl_divider.png", "https://images.ecency.com/DQmZ4HF3hjV4HwJXuw8vRJ6B6CiMC3kUkkoihjtm7z2Gii7/hl_footer_banner.png", "https://cdn.steemitimages.com/DQmXd6PwGUHRgSDkWtwKfDvdFpaLHXvXBdK7wnYZeqe1GUa/discord_animation_logo.gif"], "thumbnails": ["https://images.ecency.com/DQmXWUquMbtu86v5TStJeLbAfZedCTkGuuE4vYn1o7RJ4k9/multi_purpose_1_.png", "https://images.ecency.com/DQmQVNmAjFSMwAPFXxVnZc1L6qL6NVwSwxoDLy5oYGGNBdw/image.png", "https://images.ecency.com/DQmbF9d5E71zuveDdBRVnDs3SqVzkRp9Sb2RjRiYg2iat6C/image.png", "https://images.ecency.com/DQmPcMmxC1YnSebcAoXZyoPvc3R9LchqGZoiognNZphubGY/image.png", "https://images.ecency.com/DQmNum6GgiA6xgBG5DbpbVcusHS8Zy7EcrXR2kcn4ADgEnj/image.png", "https://images.ecency.com/DQmV1LbYvsA1bTarKSASDjQWtSFnLGmDdXBAEa6HXkWhARo/image.png", "https://images.ecency.com/DQmdWTFyDLnpKUsrBrwSwGLv4RSZQ89nozP7HnhiH7ta4hN/image.png", "https://images.ecency.com/DQmabQycJhW8DT8a634z3wQaVXvPZ5KMii2LYbaWZ3PsaRy/hl_divider.png", "https://images.ecency.com/DQmZ4HF3hjV4HwJXuw8vRJ6B6CiMC3kUkkoihjtm7z2Gii7/hl_footer_banner.png", "https://cdn.steemitimages.com/DQmXd6PwGUHRgSDkWtwKfDvdFpaLHXvXBdK7wnYZeqe1GUa/discord_animation_logo.gif"], "tags": ["hive-153850", "stem", "education", "programming", "firebase", "firestore", "development", "android", "java", "neoxian"], "description": "", "app": "ecency/3.0.25-vision", "format": "markdown+html"}"
created2022-08-23 14:00:45
last_update2022-08-23 14:00:45
depth0
children2
last_payout2022-08-30 14:00:45
cashout_time1969-12-31 23:59:59
total_payout_value11.328 HBD
curator_payout_value11.235 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,240
author_reputation104,701,778,605,493
root_title"Firebase Firestore | Android App Development | Lecture#53 | Hive Learners"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,962,843
net_rshares32,993,960,951,378
author_curate_reward""
vote details (351)
@ecency ·
**Yay!** 🤗<br>Your content has been **boosted with Ecency Points**, by @faisalamin. <br>Use Ecency daily to boost your growth on platform! <br><br><b>Support Ecency</b><br>[Vote for new Proposal](https://hivesigner.com/sign/update-proposal-votes?proposal_ids=%5B197%5D&approve=true)<br>[Delegate HP and earn more](https://ecency.com/hive-125125/@ecency/daily-100-curation-rewards)
properties (22)
authorecency
permlinkre-2022823t16258889z
categoryhive-153850
json_metadata{"tags":["ecency"],"app":"ecency/3.0.20-welcome","format":"markdown+html"}
created2022-08-23 16:25:09
last_update2022-08-23 16:25:09
depth1
children0
last_payout2022-08-30 16:25:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length380
author_reputation624,422,971,962,054
root_title"Firebase Firestore | Android App Development | Lecture#53 | Hive Learners"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,966,412
net_rshares0
@stemsocial ·
re-faisalamin-firebase-firestore-or-android-app-20220824t005837000z
<div class='text-justify'> <div class='pull-left'>
 <img src='https://stem.openhive.network/images/stemsocialsupport7.png'> </div>

Thanks for your contribution to the <a href='/trending/hive-196387'>STEMsocial community</a>. Feel free to join us on <a href='https://discord.gg/9c7pKVD'>discord</a> to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support.&nbsp;<br />&nbsp;<br />
</div>
properties (22)
authorstemsocial
permlinkre-faisalamin-firebase-firestore-or-android-app-20220824t005837000z
categoryhive-153850
json_metadata{"app":"STEMsocial"}
created2022-08-24 00:58:36
last_update2022-08-24 00:58:36
depth1
children0
last_payout2022-08-31 00:58:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length565
author_reputation22,927,767,309,334
root_title"Firebase Firestore | Android App Development | Lecture#53 | Hive Learners"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,976,784
net_rshares0