create account

Android App Development | Lecture#40 | Hive Learners by faisalamin

View this thread on: hive.blogpeakd.comecency.com
· @faisalamin ·
$23.12
Android App Development | Lecture#40 | Hive Learners
<center><h2>๐“–๐“ป๐“ฎ๐“ฎ๐“ฝ๐“ฒ๐“ท๐“ฐ๐“ผ</h2></center>
<div class="text-justify">

Hi dear Hive Learners, In our [39th lecture](https://ecency.com/hive-153850/@faisalamin/android-app-development-or-lecture-054ba9ac17bd5) we learn how to implement the on-button click listener using the interface in adapter class. We use the static data to populate the ListView. But from now we are going to learn how to save and fetch data from the firebase database. In this lecture, we will add the firebase dependencies and set up our project for a smooth run. So let's get started.

![](https://images.ecency.com/DQmQoSsufxoynStnWuQnhGu7mf9VE6WjktD8kWGkFVp2HhW/multi_purpose.png)

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

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

### What Should I Learn

- How to add Firebase real-time database in the project

### Assignment

- Configure a real-time database in the project

### Procedure

We will use the Firebase assistance to add the Firebase real-time database dependencies. It is the best way to configure our project. Follow this step to open Firebase Assistance. Make sure you are login into the Android Studio.

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


Now open the Realtime Database tab and click on Get Started as shown here.

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

If the **Connect to Firebase** button showing then you need to click on it and connect your app to Firebase. I am assuming that you already created a Firebase Project and on this button click, it will auto change in Connected state, When it is getting connected we need to click on the 2nd step button as shown here.

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

Choose your project from the Firebase Dashboard and it will open this screen click on connect.

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


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

Now our app is successfully connected with firebase. Click on add dependencies button.

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

Click on Accept Changes and wait for the Gradle sync.

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

You will see this message **Dependencies set up correctly** on a successful Gradle build. Congratulation Firebase Database is configured successfully. In the next lecture, we will send data to the firebase database.</div>

![](https://images.ecency.com/DQmQ1mN4y1sbYnMroLBAUZDoJRRtWCM2E21QukA4wJ4E6si/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 200 others
properties (23)
authorfaisalamin
permlinkandroid-app-development-or-lecture-3a876f7c6233
categoryhive-153850
json_metadata{"links":["https://ecency.com/hive-153850/@faisalamin/android-app-development-or-lecture-054ba9ac17bd5","https://github.com/faisalamin9696/HiveLearners2","https://discord.gg/7Bzqv4qUMT"],"image":["https://images.ecency.com/DQmQoSsufxoynStnWuQnhGu7mf9VE6WjktD8kWGkFVp2HhW/multi_purpose.png","https://images.ecency.com/DQmUf7NwBsmbhGHhHkkXMCULPQQctQcyWKdJ1ykGFx4mqEe/image.png","https://images.ecency.com/DQmeTFKXrLR5STWsZiYD4r6WBoRLZGV1pLmNiCS9wReqUtG/image.png","https://images.ecency.com/DQmNbKfNDrt3qhQRQfTpZWGEiMfqoRNq2Fb9SjM1zvvDs4M/image.png","https://images.ecency.com/DQmVv31wxxkS15Dx7LJaAp2Rnh2UGcWsmfEH9PekKNAiM1i/image.png","https://images.ecency.com/DQmcY3GGoVbqDXjxt6qNeBErmWruCtLSKHyPex9EQNk1Vnr/image.png","https://images.ecency.com/DQmTgrFNRss97RBcnpqvKF2wnsj93rknPfCSoQNBP3bvoRY/image.png","https://images.ecency.com/DQmVdjSvLVjzVFmxzHwMAvKfRP7Fqx7k6oLfx5S3FTby1b8/image.png","https://images.ecency.com/DQmQ1mN4y1sbYnMroLBAUZDoJRRtWCM2E21QukA4wJ4E6si/image.png"],"thumbnails":["https://images.ecency.com/DQmQoSsufxoynStnWuQnhGu7mf9VE6WjktD8kWGkFVp2HhW/multi_purpose.png","https://images.ecency.com/DQmUf7NwBsmbhGHhHkkXMCULPQQctQcyWKdJ1ykGFx4mqEe/image.png","https://images.ecency.com/DQmeTFKXrLR5STWsZiYD4r6WBoRLZGV1pLmNiCS9wReqUtG/image.png","https://images.ecency.com/DQmNbKfNDrt3qhQRQfTpZWGEiMfqoRNq2Fb9SjM1zvvDs4M/image.png","https://images.ecency.com/DQmVv31wxxkS15Dx7LJaAp2Rnh2UGcWsmfEH9PekKNAiM1i/image.png","https://images.ecency.com/DQmcY3GGoVbqDXjxt6qNeBErmWruCtLSKHyPex9EQNk1Vnr/image.png","https://images.ecency.com/DQmTgrFNRss97RBcnpqvKF2wnsj93rknPfCSoQNBP3bvoRY/image.png","https://images.ecency.com/DQmVdjSvLVjzVFmxzHwMAvKfRP7Fqx7k6oLfx5S3FTby1b8/image.png","https://images.ecency.com/DQmQ1mN4y1sbYnMroLBAUZDoJRRtWCM2E21QukA4wJ4E6si/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","neoxian","pakistan","dev","development","programming","android","java"],"description":"","app":"ecency/3.0.24-vision","format":"markdown+html"}
created2022-08-08 15:28:36
last_update2022-08-08 15:28:36
depth0
children7
last_payout2022-08-15 15:28:36
cashout_time1969-12-31 23:59:59
total_payout_value11.602 HBD
curator_payout_value11.517 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,299
author_reputation104,701,778,605,493
root_title"Android App Development | Lecture#40 | Hive Learners"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,544,827
net_rshares29,116,855,179,652
author_curate_reward""
vote details (264)
@anonymous02 ·
Wow I think this is one of those advanced tutorials on Hive about random topics. Salute! It's hard to code though.
๐Ÿ‘  , , ,
properties (23)
authoranonymous02
permlinkre-faisalamin-202289t1112718z
categoryhive-153850
json_metadata{"tags":["hive-153850","stem","education","neoxian","pakistan","dev","development","programming","android","java"],"app":"ecency/3.0.32-mobile","format":"markdown+html"}
created2022-08-09 03:01:06
last_update2022-08-09 03:01:06
depth1
children1
last_payout2022-08-16 03:01:06
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_length114
author_reputation19,151,173,609,605
root_title"Android App Development | Lecture#40 | Hive Learners"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,561,511
net_rshares2,031,001,525
author_curate_reward""
vote details (4)
@faisalamin ·
Thank you dear, Steps are easy to follow
๐Ÿ‘  , , ,
properties (23)
authorfaisalamin
permlinkre-anonymous02-202289t111928661z
categoryhive-153850
json_metadata{"tags":["hive-153850","stem","education","neoxian","pakistan","dev","development","programming","android","java"],"app":"ecency/3.0.24-vision","format":"markdown+html"}
created2022-08-09 06:19:30
last_update2022-08-09 06:19:30
depth2
children0
last_payout2022-08-16 06:19:30
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_length40
author_reputation104,701,778,605,493
root_title"Android App Development | Lecture#40 | Hive Learners"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,564,488
net_rshares2,028,461,023
author_curate_reward""
vote details (4)
@curation-cartel ·
![1UP-PIZZA.png](https://files.peakd.com/file/peakd-hive/curation-cartel/23xediR4hotaNsS5pUJrmYVg3YGeTLpui41uCij2jhUDZ4uFT84zoGJf8a8VnfELXLJgt.png) |  <div class="phishy"><u><h4>You have received a __1UP__ from @gwajnberg!</h4></u></div> The @oneup-cartel will soon upvote you with:<hr> __@stem-curator, @neoxag-curator__ <hr>_And they will bring !PIZZA ๐Ÿ•._
-|-

<sup>[Learn more](https://peakd.com/hive-102223/@flauwy/the-curation-cartel-1up-trigger-smart-voting-mana-and-high-delegation-returns-for-14-different-tribes) about our delegation service to earn daily rewards. Join the Cartel on [Discord](https://discord.gg/mvtAneE3Ca).</sup>
properties (22)
authorcuration-cartel
permlinkre-android-app-development-or-lecture-3a876f7c6233-20220808t163338z
categoryhive-153850
json_metadata"{"app": "beem/0.24.26"}"
created2022-08-08 16:33:39
last_update2022-08-08 16:33:39
depth1
children0
last_payout2022-08-15 16:33:39
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_length640
author_reputation1,123,173,135,173
root_title"Android App Development | Lecture#40 | Hive Learners"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,546,495
net_rshares0
@gwajnberg ·
Interesting ! for that you don't need any coding!
!1UP
<div class=text-center> You can earn passive income by delegation of tribe tokens to "The Cartel".

[![dlmmqb-TheCartel-banner](https://images.hive.blog/p/FUkUE5bzkAZT3HzV5tJDiU2ik81PCd4JCyhWnRcDN8XJsVFY3UNB8DCSmoM2ujRpecRrPXsPH9dFMuJKxLKfeZPBgLnZuUbnYbwhioLnFLQPnge8EMm1SCsLqC5EQSHEM7uy7Bso7uBpiM6je1T8qfEb8c4wuu3hF5XU?format=match&mode=fit)](https://discord.gg/zQrvxAu7mu) 
Click this banner to join "The Cartel" discord server to know more. </div>
๐Ÿ‘  , , ,
properties (23)
authorgwajnberg
permlinkrgb1qm
categoryhive-153850
json_metadata{"tags":["stem"],"image":["https://images.hive.blog/p/FUkUE5bzkAZT3HzV5tJDiU2ik81PCd4JCyhWnRcDN8XJsVFY3UNB8DCSmoM2ujRpecRrPXsPH9dFMuJKxLKfeZPBgLnZuUbnYbwhioLnFLQPnge8EMm1SCsLqC5EQSHEM7uy7Bso7uBpiM6je1T8qfEb8c4wuu3hF5XU?format=match&mode=fit"],"links":["https://discord.gg/zQrvxAu7mu"],"app":"stemgeeks/0.1","canonical_url":"https://stemgeeks.net/@gwajnberg/rgb1qm"}
created2022-08-08 16:27:57
last_update2022-08-08 16:27:57
depth1
children1
last_payout2022-08-15 16:27:57
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_length505
author_reputation146,288,039,433,040
root_title"Android App Development | Lecture#40 | Hive Learners"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,546,348
net_rshares2,142,676,872
author_curate_reward""
vote details (4)
@faisalamin ·
Yeah that's the magic of Firebase Assistance
๐Ÿ‘  , , ,
properties (23)
authorfaisalamin
permlinkre-gwajnberg-202289t202339222z
categoryhive-153850
json_metadata{"tags":["stem"],"app":"ecency/3.0.24-vision","format":"markdown+html"}
created2022-08-09 15:23:42
last_update2022-08-09 15:23:42
depth2
children0
last_payout2022-08-16 15:23:42
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_length44
author_reputation104,701,778,605,493
root_title"Android App Development | Lecture#40 | Hive Learners"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,575,133
net_rshares2,033,544,065
author_curate_reward""
vote details (4)
@hivebuzz ·
Congratulations @faisalamin! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

<table><tr><td><img src="https://images.hive.blog/60x70/http://hivebuzz.me/@faisalamin/comments.png?202208090643"></td><td>You made more than 900 comments.<br>Your next target is to reach 1000 comments.</td></tr>
</table>

<sub>_You can view your badges on [your board](https://hivebuzz.me/@faisalamin) and compare yourself to others in the [Ranking](https://hivebuzz.me/ranking)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>


To support your work, I also upvoted your post!


**Check out the last post from @hivebuzz:**
<table><tr><td><a href="/hive-106258/@hivebuzz/hivefest-trf-2022"><img src="https://images.hive.blog/64x128/https://i.imgur.com/2371e0x.png"></a></td><td><a href="/hive-106258/@hivebuzz/hivefest-trf-2022">Hivebuzz supports the HiveFestโท Travel Reimbursement Fund.</a></td></tr><tr><td><a href="/hive-122221/@hivebuzz/pum-202207-delegations"><img src="https://images.hive.blog/64x128/https://i.imgur.com/fg8QnBc.png"></a></td><td><a href="/hive-122221/@hivebuzz/pum-202207-delegations">Our Hive Power Delegations to the July PUM Winners </a></td></tr></table>
properties (22)
authorhivebuzz
permlinknotify-faisalamin-20220809t070509
categoryhive-153850
json_metadata{"image":["http://hivebuzz.me/notify.t6.png"]}
created2022-08-09 07:05:09
last_update2022-08-09 07:05:09
depth1
children0
last_payout2022-08-16 07:05: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_length1,285
author_reputation367,708,042,415,113
root_title"Android App Development | Lecture#40 | Hive Learners"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,565,163
net_rshares0
@stemsocial ·
re-faisalamin-android-app-development-or-lecture-3a876f7c6233-20220808t165827142z
<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-android-app-development-or-lecture-3a876f7c6233-20220808t165827142z
categoryhive-153850
json_metadata{"app":"STEMsocial"}
created2022-08-08 16:58:27
last_update2022-08-08 16:58:27
depth1
children0
last_payout2022-08-15 16:58:27
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,452,035,029,141
root_title"Android App Development | Lecture#40 | Hive Learners"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,547,174
net_rshares0