How to retrieve data from Firebase Realtime database to a Listview. Android Studio Tutorial

  Рет қаралды 55,158

CubixSol

CubixSol

4 жыл бұрын

In this video, I am going to show you how to retrieve data from the firebase real-time database to a list view. I hope you must enjoy this tutorial because most tutorials are for beginners this is also an android studio tutorial for beginners
Donate me:
Paypal: paypal.me/finegap?country.x=A...
Binance Pay ID: 253333352
==============================
Follow us Links:
Instagram: / fine_gap
Facebook: / cubixsol
Linkedin: / cubixsol
Whatsapp: +923233151852
================================================

Пікірлер: 101
@Cubixsolution
@Cubixsolution 4 жыл бұрын
ANY CAPTION ABOUT Tutorial
@60_9
@60_9 4 жыл бұрын
Yes, great and simple ^_^
@alaaedinnebenmbarek2088
@alaaedinnebenmbarek2088 4 жыл бұрын
Caption: clean
@asfkja9332
@asfkja9332 2 жыл бұрын
Не знаю вашего языка, напишу на Русском) Самое краткое видео, и главное что по сути)) Выражаю вам уважение) Спасибо
@Cubixsolution
@Cubixsolution 2 жыл бұрын
kindly tell us in english
@kiranmustafa589
@kiranmustafa589 4 жыл бұрын
Your tutorials are very helpful for me. thank you
@Cubixsolution
@Cubixsolution 3 жыл бұрын
Thanks
@user-dd2sd3gs7z
@user-dd2sd3gs7z 4 жыл бұрын
what if i want it to show me the newest one in the top . from the newest tho the previous?
@muhdfikri4709
@muhdfikri4709 4 жыл бұрын
easy, simple and it works! you save my live bro. may Allah bless you
@Cubixsolution
@Cubixsolution 3 жыл бұрын
ohhh Thank you soo much
@subhashkumar5896
@subhashkumar5896 4 жыл бұрын
if i press button to retrieve data from firebase and then press the same button again then it retrieve same thing again and again many time when button pressed, how to solve this ?
@ridaistikhar4496
@ridaistikhar4496 4 жыл бұрын
very informative video
@khadijahh1366
@khadijahh1366 4 жыл бұрын
Amazing video thank you
@Cubixsolution
@Cubixsolution 3 жыл бұрын
Glad you enjoyed it
@user-rl6wc3bt7i
@user-rl6wc3bt7i 4 жыл бұрын
Facu man you the best i love you 😎🤜🤛
@Cubixsolution
@Cubixsolution 3 жыл бұрын
i love you to.
@dhakshnamoorthy8673
@dhakshnamoorthy8673 3 жыл бұрын
Hey there I'm creating a chat app and I send msg to a child in firebase and I retrieve the msg of others through onDataChange in value event listener but the problem is when I retrieve msg I their particular activity page it works well but when I leave that page and moves to another person chat and comes back to his chat page Im receiving his last chat against due to the value event listener so I have done another way. It is I have deleted the msg from firebase once I have read it from firebase and put an if condition at onDataChange stating if the firebase value is not empty then perform the task inside onDataChange else not . now it works well but when I go back for twice or thrice and comes back the new msg from him is displaying twice or thrice accordingly to me pls help me.
@ginkooo2970
@ginkooo2970 4 жыл бұрын
thank you man
@Cubixsolution
@Cubixsolution 4 жыл бұрын
THANKS FOR SUPPORT.
@skrillexsn
@skrillexsn 4 жыл бұрын
I have spend 4 days looking for a tutorial, that can show me how to retreive text from Firebase to my app, I have watched more than 15 tutorials, read hundred of forum pages, with no success, and yesterday I watched a 45 min tutorial and it gave me bunch of erreur, till today, I gave it a shot with your tutorial, and first try it work, thank you so much for this. I have one question if I want to desplay only a part of the data for example in page one (Faheem), Page two (Hassan) page three ( Ali) .... etc, is that possible?
@Cubixsolution
@Cubixsolution 3 жыл бұрын
yes it is possible
@kamalabaikattimani6994
@kamalabaikattimani6994 3 жыл бұрын
Hi.... Could you tell please.. Sir, i want to play youtube video using Firebase database and dont want to add Video ID in code, i want to add Video ID to database and then get it from there...and play in our app. By using KZfaq player View. Please help me🙏🙏🙏🙏
@sanatabasum4599
@sanatabasum4599 4 жыл бұрын
This video is very useful
@Cubixsolution
@Cubixsolution 4 жыл бұрын
THANKS FOR SUPPORT
@rioaryas
@rioaryas 3 жыл бұрын
why my DatabaseReference gets red? and when i write firebasedatabase it also red?
@newshubwithzaini2928
@newshubwithzaini2928 4 жыл бұрын
plz upload more ....amazing method
@Cubixsolution
@Cubixsolution 4 жыл бұрын
Don't worry, more video it will be upload soon
@gabrielerandazzo7194
@gabrielerandazzo7194 2 жыл бұрын
How I can add an ImageView?
@studyonline131
@studyonline131 3 жыл бұрын
can we use the same code that receiving data on realtime , if arduino and firebase + android is connected ?
@Cubixsolution
@Cubixsolution 3 жыл бұрын
May be some customization will need i cannot answer it 100%
@HikayatNoor1
@HikayatNoor1 4 жыл бұрын
thank you babae
@Cubixsolution
@Cubixsolution 3 жыл бұрын
your welcome my babe.
@opk9526
@opk9526 4 жыл бұрын
nice
@Cubixsolution
@Cubixsolution 4 жыл бұрын
THANKS FOR SUPPORT
@BIlalKhan-te6ii
@BIlalKhan-te6ii 3 жыл бұрын
when i add listview my application does't opens even if it's not on the main activity.
@BIlalKhan-te6ii
@BIlalKhan-te6ii 3 жыл бұрын
i am using Linear Layout
@yuireisingngalung301
@yuireisingngalung301 3 жыл бұрын
How will I fetch list of item VALUE onClick of the list item in another activity??... please help out
@Cubixsolution
@Cubixsolution 3 жыл бұрын
You simple have to set on click listener on the list item and pass the unique id of that list as a string in the next page you can retrieve the value of that id by making a database connection to that path
@hafsanaeem9325
@hafsanaeem9325 2 жыл бұрын
dataSnapshot gives error
@mopiko9742
@mopiko9742 4 жыл бұрын
com.google.firebase.database.DatabaseException: Failed to convert value of type java.util.HashMap to String . I spent 2hours checking error.
@Cubixsolution
@Cubixsolution 3 жыл бұрын
Please sorry i did not understand your message.
@amirchernin7254
@amirchernin7254 3 жыл бұрын
Hello. How can I show specific user information and not all of it? (For example: just user email)
@Cubixsolution
@Cubixsolution 3 жыл бұрын
In that case we will have that user email in child and we can easily retrive the email of each user in the list view by using a loop and child data path
@amirchernin7254
@amirchernin7254 3 жыл бұрын
@@Cubixsolution Thank you! Do you think that there is a way to retrieve different information? I saw you can do getCurrentUser.getEmail(). I added "score" to all of my users, and I'm struggling with retrieving it because there is no getScore() function.
@nayandas4713
@nayandas4713 3 жыл бұрын
Bro.. good tutorial.. just simple advice.. dont rush.. slow down and make some good tutorial
@Cubixsolution
@Cubixsolution 3 жыл бұрын
Thanks for the tip
@alabri60
@alabri60 4 жыл бұрын
it didnt work with me no error in java but the app go out whe i run it
@Cubixsolution
@Cubixsolution 3 жыл бұрын
you should try to google it
@mervinlee450
@mervinlee450 3 жыл бұрын
Hello! How can we read from integers? I always get a null value..
@Cubixsolution
@Cubixsolution 3 жыл бұрын
I think you should convert it to interger value first by using parse.int
@Nikola1999
@Nikola1999 2 жыл бұрын
I just saw this comment, first check if dataSnapshot.nodeValue != null, then try parsing. Also check if you gave permission on firebase. It could be10000 things
@60_9
@60_9 4 жыл бұрын
how to do the same with a single text view?
@Cubixsolution
@Cubixsolution 4 жыл бұрын
its video will be upload soon
@ayauthor605
@ayauthor605 4 жыл бұрын
I just have blank page. It did not show the list. Please help me
@manalbenchrif2961
@manalbenchrif2961 4 жыл бұрын
too
@Cubixsolution
@Cubixsolution 3 жыл бұрын
Please i cannot help you without seeing your console.
@Siddharth-rs1ge
@Siddharth-rs1ge 3 жыл бұрын
Ok, idk why but we need to specify the link of db in this Main Activity Class, till that it won't show anything. Other code is easy to understand bcoz of u and thnx for it. Ok and 2nd of all GO TO DB and allow READ and WRITE.
@Cubixsolution
@Cubixsolution 3 жыл бұрын
Thanks
@Siddharth-rs1ge
@Siddharth-rs1ge 3 жыл бұрын
@@Cubixsolution yeah, thnx for helping by tut too...
@Jatinvys
@Jatinvys 3 жыл бұрын
What if I want data from specific child
@Cubixsolution
@Cubixsolution 3 жыл бұрын
Its simple. Then you have to give child path
@md.tahiranamtamin8255
@md.tahiranamtamin8255 4 жыл бұрын
can you give the source code in the description link?
@Cubixsolution
@Cubixsolution 3 жыл бұрын
source code is lost but we will try to give the source code in next videos.
@87nehal
@87nehal 3 жыл бұрын
Data snapshot shows error
@Cubixsolution
@Cubixsolution 3 жыл бұрын
In my case it works i cannot show you the problem with out seeing your screen
@rkshorts..70
@rkshorts..70 4 жыл бұрын
Firebase se kese connect kr
@Cubixsolution
@Cubixsolution 3 жыл бұрын
please simply search on youtube its soo simple
@farahnaz5399
@farahnaz5399 3 жыл бұрын
Why my app is crashed I run the app plz guide me
@Cubixsolution
@Cubixsolution 3 жыл бұрын
I can only help if i will see your code
@kingcripto5443
@kingcripto5443 3 жыл бұрын
@@Cubixsolution my app crash after click in this activity . My Code : public class Drinks extends AppCompatActivity { ListView myListView; ArrayList MyArrayList = new ArrayList(); DatabaseReference mRef; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_drinks); final ArrayAdapter MyArrayAdapter = new ArrayAdapter(Drinks.this,android.R.layout.simple_list_item_1,MyArrayList); myListView = (ListView) findViewById(R.id.ListView1); myListView.setAdapter(MyArrayAdapter); mRef = FirebaseDatabase.getInstance().getReference("Main"); mRef.addChildEventListener(new ChildEventListener() { @Override public void onChildAdded(@NonNull DataSnapshot snapshot, @Nullable String previousChildName) { String value = snapshot.getValue(String.class); MyArrayList.add(value); MyArrayAdapter.notifyDataSetChanged(); } @Override public void onChildChanged(@NonNull DataSnapshot snapshot, @Nullable String previousChildName) { MyArrayAdapter.notifyDataSetChanged(); } @Override public void onChildRemoved(@NonNull DataSnapshot snapshot) { } @Override public void onChildMoved(@NonNull DataSnapshot snapshot, @Nullable String previousChildName) { } @Override public void onCancelled(@NonNull DatabaseError error) { } }); } }
@hafsanaeem9325
@hafsanaeem9325 2 жыл бұрын
@@kingcripto5443 same happend to me app crashes and code is the same. did you do anything please let me know
@statusmemesentertaintment7048
@statusmemesentertaintment7048 3 жыл бұрын
here some error in datasnapshot
@Cubixsolution
@Cubixsolution 3 жыл бұрын
whats the error?
@kingcripto5443
@kingcripto5443 3 жыл бұрын
change per : snapshop
@mensaka99
@mensaka99 Жыл бұрын
It doesen't work
@Cubixsolution
@Cubixsolution Жыл бұрын
Please watch the video again or search your error on stackoverflow or email us whats error you are getting?
@clout1743
@clout1743 4 жыл бұрын
it's not retrive data on app plz do something..
@Cubixsolution
@Cubixsolution 4 жыл бұрын
what is the error>
@anumaamir3441
@anumaamir3441 4 жыл бұрын
@@Cubixsolution same plz help me as i ave to submit my project. It is also not showing any error
@Cubixsolution
@Cubixsolution 4 жыл бұрын
@@anumaamir3441 Please explain to me how I can help you?
@manalbenchrif2961
@manalbenchrif2961 4 жыл бұрын
@@Cubixsolution i do the same step but i got an empty activity i, not showing list?????/help please
@kingcripto5443
@kingcripto5443 3 жыл бұрын
@Cubix Sol i have this problem , the app crash and close after click in the activity , and i do do the step by step of vídeo .
@bmwchannel24
@bmwchannel24 4 жыл бұрын
where is source code ?
@Cubixsolution
@Cubixsolution 3 жыл бұрын
please we did not upload the source code of this video
@bmwchannel24
@bmwchannel24 3 жыл бұрын
@@Cubixsolution then leave it 😉
@Hindu10111
@Hindu10111 4 жыл бұрын
plz upload source code to github
@Cubixsolution
@Cubixsolution 3 жыл бұрын
i will try to upload the next videos source code. Please current videos source code is not available
@Hindu10111
@Hindu10111 3 жыл бұрын
@@Cubixsolution ok.
@rajkumarrupapara8221
@rajkumarrupapara8221 3 жыл бұрын
Abe e kay sab hey sab ka sab galat hey 😂😂😂😂😂
@Cubixsolution
@Cubixsolution 3 жыл бұрын
Thanks for your feedback. Please tell us how can i correct it?
@82682eric
@82682eric 4 жыл бұрын
there's a error with "Failed to convert value of type java.util.HashMap to String" ,How to solve this problem?
@sumukhagc5528
@sumukhagc5528 4 жыл бұрын
Use hashmap.getValue()
A Guide on Flutter Realtime Database with Firebase
16:43
Flutterware
Рет қаралды 10 М.
Smart Sigma Kid #funny #sigma #comedy
00:40
CRAZY GREAPA
Рет қаралды 33 МЛН
Как бесплатно замутить iphone 15 pro max
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 8 МЛН
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 11 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:40
CRAZY GREAPA
Рет қаралды 33 МЛН