<center><h2>𝓖𝓻𝓮𝓮𝓽𝓲𝓷𝓰𝓼</h2></center> <div class="text-justify"> Dear Hive Learners, In the previous lecture we learn how to get the Profile Image in an Image View. Today we will configure the FirebaseStorage so that we can save this image in our Firebase storage when the user signup. We will save the link to the image in our real-time database. When we successfully upload an image to Firebase Storage we will get a link to access the image.  ## [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 - How to add Firebase Cloud Storage to our peoject ## Assignment - Configure Firebase Cloud SDK to your project ## Procedure First of all, we need to open the Firebase Assistance. This will help us to implement the dependencies in one click. Open the Cloud Storage section and connect your app to Firebase and click on ``` Add the Cloud storage SDK to your app```. This will implement the dependencies and sync the project. Wait for the project to sync successfully.  Click on Accept Changes.  Now declare and initialize the Firebase Storage and the Storage Reference variables. ``` private FirebaseStorage storage = FirebaseStorage.getInstance(); private StorageReference storageRef = storage.getReference(); ```  Now we can use this storage reference to save the images in a child. Let's name it ```profile_images```. We can implement the On Complete Listener and this time I am using null in place of File Uri as we do not pick the Uri yet. ``` storageRef.child("profile_images").putFile(null).addOnCompleteListener(task -> { }); ```  We can show the Progressbar when the file is uploading and cancel if the task is failed or successful. ``` storageRef.child("profile_images").putFile(null).addOnCompleteListener(task -> { progressDialog.setMessage("Please wait..."); progressDialog.show(); progressDialog.setCancelable(false); if (task.isSuccessful()) { if (progressDialog.isShowing()) { progressDialog.cancel(); Toast.makeText(this, "Uploaded", Toast.LENGTH_SHORT).show(); } } else { Toast.makeText(this, "Failed", Toast.LENGTH_SHORT).show(); if (progressDialog.isShowing()) { progressDialog.cancel(); } } }); ```  In the next lecture, we will create a function upload_image with the parameter Uril. This function will accept the Uri where is called. In the Activity result method, we will call save the Uri in a variable,, and on the profile creation time we can set the Uri in his function or we can use this Uri for the UserProfileChangeRequest.</div> <center>  <h2>Thank You</h2>  <div class="pull-left"><a href="https://discord.gg/7Bzqv4qUMT"> <img src="https://cdn.steemitimages.com/DQmXd6PwGUHRgSDkWtwKfDvdFpaLHXvXBdK7wnYZeqe1GUa/discord_animation_logo.gif"/></a> </center>
author | faisalamin |
---|---|
permlink | firebase-cloud-storage-or-android |
category | hive-153850 |
json_metadata | "{"links": ["https://github.com/faisalamin9696/HiveLearners2", "https://discord.gg/7Bzqv4qUMT"], "image": ["https://images.ecency.com/DQmYc14xumFXwc9eRKZT88sTESmbjXeQ2T5FonwmKHhyyZW/multi_purpose_7_.png", "https://images.ecency.com/DQmUM5Kud3JV68vMmgH7PpTaBEA7kkb5zMfT5jWo2YuwBz6/image.png", "https://images.ecency.com/DQmUBpc6fSbMiuRRBJMrBdpQpq5fN7kBk7CQxLgfUbnST6N/image.png", "https://images.ecency.com/DQmcKWX7QrMAjyNy1EXZrKANxngqteGqXXozSFQqB8PYhwt/image.png", "https://images.ecency.com/DQmZoNVvu9HVFqiaiMCPHqNJUENTnwpNVAKREd9aV4w6jcQ/image.png", "https://images.ecency.com/DQmcp1s1h5bcqvjHe6xu8V7WzYWfKhhgMN9fofexfkQPBsJ/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/DQmYc14xumFXwc9eRKZT88sTESmbjXeQ2T5FonwmKHhyyZW/multi_purpose_7_.png", "https://images.ecency.com/DQmUM5Kud3JV68vMmgH7PpTaBEA7kkb5zMfT5jWo2YuwBz6/image.png", "https://images.ecency.com/DQmUBpc6fSbMiuRRBJMrBdpQpq5fN7kBk7CQxLgfUbnST6N/image.png", "https://images.ecency.com/DQmcKWX7QrMAjyNy1EXZrKANxngqteGqXXozSFQqB8PYhwt/image.png", "https://images.ecency.com/DQmZoNVvu9HVFqiaiMCPHqNJUENTnwpNVAKREd9aV4w6jcQ/image.png", "https://images.ecency.com/DQmcp1s1h5bcqvjHe6xu8V7WzYWfKhhgMN9fofexfkQPBsJ/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", "pakistan", "development", "programming", "firebase", "android", "firebasestorage"], "description": "", "app": "ecency/3.0.26-vision", "format": "markdown+html"}" |
created | 2022-08-29 14:50:33 |
last_update | 2022-08-29 14:50:33 |
depth | 0 |
children | 2 |
last_payout | 2022-09-05 14:50:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 10.453 HBD |
curator_payout_value | 10.393 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 3,899 |
author_reputation | 104,701,778,605,493 |
root_title | "Firebase Cloud Storage | Android App Development | Lecture#59 | Hive Learners" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 116,140,919 |
net_rshares | 29,519,721,123,056 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
eric-boucher | 0 | 1,845,984,443 | 0.4% | ||
thecryptodrive | 0 | 6,076,192,190 | 0.16% | ||
mammasitta | 0 | 1,289,998,602 | 0.4% | ||
good-karma | 0 | 68,301,785,794 | 6.49% | ||
cloh76 | 0 | 527,103,391 | 0.4% | ||
lordvader | 0 | 7,262,829,798 | 0.8% | ||
rmach | 0 | 2,769,582,759 | 5% | ||
lemouth | 0 | 248,460,770,685 | 10% | ||
lamouthe | 0 | 730,754,977 | 10% | ||
tfeldman | 0 | 734,325,383 | 0.4% | ||
mcsvi | 0 | 109,399,373,296 | 50% | ||
funnyman | 0 | 1,422,074,916 | 6% | ||
justyy | 0 | 3,980,233,403 | 0.8% | ||
curie | 0 | 94,114,596,889 | 0.8% | ||
techslut | 0 | 23,772,627,146 | 4% | ||
slider2990 | 0 | 11,363,089,121 | 100% | ||
roguewriter | 0 | 4,534,103,113 | 5% | ||
steemstem | 0 | 584,004,450,772 | 10% | ||
edb | 0 | 983,355,709 | 1% | ||
esteemapp | 0 | 14,527,817,423 | 6.49% | ||
walterjay | 0 | 61,454,296,487 | 5% | ||
valth | 0 | 1,490,191,277 | 5% | ||
dna-replication | 0 | 349,014,362 | 10% | ||
dhimmel | 0 | 53,521,823,198 | 2.5% | ||
oluwatobiloba | 0 | 1,070,035,709 | 10% | ||
detlev | 0 | 2,339,591,621 | 0.24% | ||
federacion45 | 0 | 1,239,154,413 | 0.4% | ||
forykw | 0 | 1,427,896,363 | 0.4% | ||
mobbs | 0 | 9,092,752,093 | 5% | ||
eliel | 0 | 17,271,690,985 | 7% | ||
jerrybanfield | 0 | 2,728,324,487 | 0.8% | ||
roomservice | 0 | 642,546,056 | 0.4% | ||
rt395 | 0 | 1,414,525,105 | 1.5% | ||
sustainablyyours | 0 | 4,084,153,087 | 5% | ||
improv | 0 | 30,889,470,564 | 10% | ||
yehey | 0 | 1,590,840,639 | 0.8% | ||
samminator | 0 | 1,636,208,765 | 0.5% | ||
drwom | 0 | 1,260,550,875 | 3.24% | ||
alphacore | 0 | 1,567,387,435 | 1.61% | ||
lorenzor | 0 | 1,312,934,943 | 50% | ||
alexander.alexis | 0 | 5,647,387,765 | 10% | ||
ew-and-patterns | 0 | 8,451,377,463 | 3% | ||
grapthar | 0 | 1,192,426,340 | 0.6% | ||
gunthertopp | 0 | 10,191,249,645 | 0.2% | ||
ludmila.kyriakou | 0 | 1,928,965,149 | 3% | ||
analealsuarez | 0 | 1,333,815,431 | 50% | ||
minnowbooster | 0 | 1,144,212,413,302 | 20% | ||
codingdefined | 0 | 11,647,833,754 | 3% | ||
howo | 0 | 293,992,375,281 | 10% | ||
tsoldovieri | 0 | 1,000,305,390 | 5% | ||
steemwizards | 0 | 496,125,981 | 0.8% | ||
neumannsalva | 0 | 585,348,225 | 0.4% | ||
stayoutoftherz | 0 | 17,102,726,368 | 0.2% | ||
abigail-dantes | 0 | 3,663,001,521 | 10% | ||
bambukah | 0 | 2,155,858,854 | 6% | ||
twoitguys | 0 | 19,932,430,961 | 50% | ||
zonguin | 0 | 598,421,031 | 2.5% | ||
iamphysical | 0 | 16,035,926,647 | 90% | ||
zyx066 | 0 | 896,326,910 | 0.4% | ||
azulear | 0 | 1,744,451,106 | 100% | ||
djlethalskillz | 0 | 1,135,547,454 | 5% | ||
psicoluigi | 0 | 767,816,977 | 50% | ||
crokkon | 0 | 4,498,325,856 | 8% | ||
calatorulmiop | 0 | 52,022,925,477 | 50% | ||
sorin.cristescu | 0 | 3,229,291,323 | 0.4% | ||
therealwolf | 0 | 9,377,488,984 | 0.8% | ||
meno | 0 | 3,078,499,745 | 0.4% | ||
esteem.app | 0 | 2,174,896,809 | 6.49% | ||
enzor | 0 | 607,097,219 | 10% | ||
bartosz546 | 0 | 1,011,052,499 | 0.4% | ||
carloserp-2000 | 0 | 800,296,325 | 100% | ||
postpromoter | 0 | 280,000,177,384 | 10% | ||
steveconnor | 0 | 525,923,818 | 0.4% | ||
gazbaz4000 | 0 | 68,743,605,195 | 100% | ||
nicole-st | 0 | 1,784,113,705 | 0.4% | ||
smartsteem | 0 | 31,856,567,822 | 0.8% | ||
aboutcoolscience | 0 | 533,126,720 | 10% | ||
kenadis | 0 | 2,654,952,852 | 10% | ||
robotics101 | 0 | 2,297,917,472 | 10% | ||
punchline | 0 | 1,901,435,112 | 0.8% | ||
auleo | 0 | 585,812,255 | 1.29% | ||
gentleshaid | 0 | 1,304,421,569 | 5% | ||
duke77 | 0 | 2,159,542,537 | 10% | ||
r00sj3 | 0 | 17,911,970,802 | 5% | ||
sco | 0 | 2,591,570,216 | 10% | ||
ennyta | 0 | 959,871,643 | 50% | ||
intrepidphotos | 0 | 176,546,130,436 | 7.5% | ||
fragmentarion | 0 | 2,096,868,081 | 10% | ||
curx | 0 | 47,520,017,787 | 10% | ||
pab.ink | 0 | 5,930,695,902 | 5% | ||
cherryng | 0 | 788,027,984 | 1.29% | ||
miguelangel2801 | 0 | 770,486,073 | 50% | ||
geopolis | 0 | 626,069,248 | 10% | ||
robertbira | 0 | 1,040,493,863 | 2.5% | ||
bhattg | 0 | 1,641,695,321 | 3.1% | ||
alexdory | 0 | 1,480,300,875 | 10% | ||
melvin7 | 0 | 3,150,714,870 | 5% | ||
francostem | 0 | 1,350,110,049 | 10% | ||
endopediatria | 0 | 692,072,199 | 20% | ||
croctopus | 0 | 1,417,448,020 | 100% | ||
tomastonyperez | 0 | 16,583,668,185 | 50% | ||
elvigia | 0 | 10,792,063,646 | 50% | ||
sanderjansenart | 0 | 652,474,227 | 0.4% | ||
blainjones | 0 | 5,200,629,489 | 6% | ||
gadrian | 0 | 31,094,122,265 | 7.5% | ||
de-stem | 0 | 5,478,709,442 | 9.9% | ||
sustainablelivin | 0 | 531,074,519 | 5% | ||
gogreenbuddy | 0 | 2,854,975,352 | 0.8% | ||
josedelacruz | 0 | 4,463,202,239 | 50% | ||
erickyoussif | 0 | 577,474,815 | 100% | ||
meanbees | 0 | 16,590,124,940 | 10% | ||
prayzz | 0 | 33,875,985,913 | 80% | ||
deholt | 0 | 542,258,891 | 8.5% | ||
anneporter | 0 | 722,543,806 | 3% | ||
diabonua | 0 | 615,173,381 | 0.4% | ||
temitayo-pelumi | 0 | 801,102,018 | 10% | ||
andrick | 0 | 837,810,069 | 50% | ||
motherofalegend | 0 | 1,332,606,670 | 5% | ||
doctor-cog-diss | 0 | 7,654,092,127 | 10% | ||
uche-nna | 0 | 634,386,856 | 0.64% | ||
anaestrada12 | 0 | 1,088,898,835 | 100% | ||
gaottantacinque | 0 | 299,362,428 | 100% | ||
xves | 0 | 496,076,057 | 13% | ||
bflanagin | 0 | 844,328,552 | 0.4% | ||
armandosodano | 0 | 1,551,617,027 | 0.4% | ||
kylealex | 0 | 4,535,242,297 | 10% | ||
gasaeightyfive | 0 | 689,880,820 | 100% | ||
cleanplanet | 0 | 46,579,778,025 | 5% | ||
fran.frey | 0 | 4,081,589,774 | 50% | ||
thelittlebank | 0 | 2,327,420,292 | 0.4% | ||
pboulet | 0 | 14,984,075,817 | 8% | ||
stem-espanol | 0 | 26,721,303,180 | 100% | ||
cribbio | 0 | 994,937,974 | 100% | ||
brianoflondon | 0 | 4,137,873,522 | 0.12% | ||
giulyfarci52 | 0 | 1,667,700,734 | 50% | ||
steemcryptosicko | 0 | 1,546,678,636 | 0.16% | ||
stem.witness | 0 | 548,598,782 | 10% | ||
devann | 0 | 4,064,793,511 | 3% | ||
optimizer | 0 | 895,668,259 | 10% | ||
infinite-love | 0 | 693,007,797 | 10% | ||
wilmer14molina | 0 | 995,908,512 | 50% | ||
jacuzzi | 0 | 2,785,533,713 | 1.5% | ||
steemstorage | 0 | 888,970,542 | 0.8% | ||
crowdwitness | 0 | 3,450,208,097 | 5% | ||
apokruphos | 0 | 2,763,594,894 | 1% | ||
limka | 0 | 116,659,185 | 80.27% | ||
steemean | 0 | 10,005,817,637 | 5% | ||
photographercr | 0 | 2,805,083,560 | 1.29% | ||
bergelmirsenpai | 0 | 544,745,307 | 10% | ||
epicdice | 0 | 532,270,820 | 0.24% | ||
aicu | 0 | 3,610,744,777 | 0.8% | ||
walterprofe | 0 | 2,345,081,107 | 5% | ||
zeruxanime | 0 | 651,718,207 | 5% | ||
stemgeeks | 0 | 17,723,213,056 | 50% | ||
stemcuration | 0 | 1,082,736,802 | 50% | ||
babytarazkp | 0 | 4,053,248,971 | 40% | ||
capp | 0 | 11,079,565,602 | 100% | ||
abh12345.stem | 0 | 549,267,308 | 25% | ||
elianaicgomes | 0 | 4,755,050,664 | 7.5% | ||
stem.alfa | 0 | 2,411,362,298 | 100% | ||
steemstem-trig | 0 | 781,262,935 | 10% | ||
yggdrasil.laguna | 0 | 264,073,611 | 25% | ||
atheistrepublic | 0 | 767,390,393 | 0.4% | ||
cd-stem | 0 | 497,040,769 | 100% | ||
roamingsparrow | 0 | 978,362,765 | 0.4% | ||
chapmain | 0 | 126,481,054 | 100% | ||
apx | 0 | 69,408,825 | 8% | ||
peterale | 0 | 1,573,510,501 | 0.4% | ||
stuntman.mike | 0 | 8,972,244,364 | 100% | ||
fengchao | 0 | 13,781,915,714 | 1% | ||
laruche | 0 | 41,455,153,676 | 1% | ||
stemsocial | 0 | 82,666,290,965 | 10% | ||
kronias | 0 | 22,040,933,024 | 80% | ||
kyleana | 0 | 1,750,718,368 | 50% | ||
hive-143869 | 0 | 111,059,098,877 | 10% | ||
ecency | 0 | 2,894,860,994,219 | 6.49% | ||
greengalletti | 0 | 3,448,428,938 | 5% | ||
ecency.stats | 0 | 2,445,479,810 | 6.49% | ||
mercurial9 | 0 | 43,875,181,450 | 100% | ||
aabcent | 0 | 1,504,858,635 | 0.64% | ||
dorkpower | 0 | 931,142,400 | 25% | ||
leonelb | 0 | 1,977,807,962 | 50% | ||
meritocracy | 0 | 8,892,662,353 | 0.08% | ||
stemline | 0 | 3,184,836,226 | 25% | ||
sillybilly | 0 | 495,585,562 | 100% | ||
he-index | 0 | 4,534,372,353 | 15% | ||
scooter77.stem | 0 | 506,318,545 | 50% | ||
oxii | 0 | 13,668,870,710 | 100% | ||
bruno-kema | 0 | 21,431,077,262 | 50% | ||
krishu.stem | 0 | 788,722,547 | 100% | ||
ruari | 0 | 840,275,101 | 100% | ||
traderhive | 0 | 720,397,595 | 0.8% | ||
cookaiss | 0 | 759,485,012 | 5% | ||
cbridges573 | 0 | 1,056,097,782 | 3.75% | ||
adamada.stem | 0 | 1,195,840,770 | 100% | ||
mahirabdullah | 0 | 32,411,933,957 | 60% | ||
holovision.stem | 0 | 2,307,170,188 | 50% | ||
tralb | 0 | 4,131,246,865 | 100% | ||
star.stem | 0 | 1,666,866,012 | 50% | ||
solominer.stem | 0 | 799,962,928 | 100% | ||
offia66 | 0 | 7,358,510,075 | 100% | ||
chincoculbert | 0 | 5,839,091,711 | 30% | ||
seinkalar | 0 | 837,176,190 | 0.8% | ||
migka | 0 | 3,916,739,371 | 90% | ||
lazy-panda | 0 | 22,114,256,752,013 | 100% | ||
deimage | 0 | 12,991,096,579 | 100% | ||
fairyberry | 0 | 1,162,060,745 | 3.24% | ||
estherscott | 0 | 5,476,800,761 | 25% | ||
saboin.stem | 0 | 390,227,008 | 50% | ||
gi-de-on | 0 | 3,395,026,015 | 30% | ||
lawrence27 | 0 | 604,360,500 | 50% | ||
queenpriscilla | 0 | 960,229,667 | 50% | ||
emmanuel222 | 0 | 2,046,469,682 | 50% | ||
dondido | 0 | 3,270,999,484 | 0.8% | ||
olivemarcel | 0 | 695,809,318 | 50% | ||
hive-learners | 0 | 2,620,759,479 | 100% | ||
auto-moderation | 0 | 10,722,265,100 | 98% | ||
prechidi | 0 | 756,219,308 | 50% | ||
niglys | 0 | 4,354,374,367 | 50% | ||
hivedeb | 0 | 2,067,697,252 | 100% | ||
minas-glory | 0 | 744,203,081 | 0.4% | ||
the-grandmaster | 0 | 632,523,147 | 0.4% | ||
the-burn | 0 | 809,555,076 | 0.4% |
**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)
author | ecency |
---|---|
permlink | re-2022829t175255761z |
category | hive-153850 |
json_metadata | {"tags":["ecency"],"app":"ecency/3.0.20-welcome","format":"markdown+html"} |
created | 2022-08-29 17:52:57 |
last_update | 2022-08-29 17:52:57 |
depth | 1 |
children | 0 |
last_payout | 2022-09-05 17:52:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 380 |
author_reputation | 624,422,971,962,054 |
root_title | "Firebase Cloud Storage | Android App Development | Lecture#59 | Hive Learners" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 116,145,412 |
net_rshares | 0 |
<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. <br /> <br /> </div>
author | stemsocial |
---|---|
permlink | re-faisalamin-firebase-cloud-storage-or-android-20220830t035430233z |
category | hive-153850 |
json_metadata | {"app":"STEMsocial"} |
created | 2022-08-30 03:54:30 |
last_update | 2022-08-30 03:54:30 |
depth | 1 |
children | 0 |
last_payout | 2022-09-06 03:54:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 565 |
author_reputation | 22,927,767,309,334 |
root_title | "Firebase Cloud Storage | Android App Development | Lecture#59 | Hive Learners" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 116,157,898 |
net_rshares | 0 |