Retrieve Data From Firebase Realtime Database in RecyclerView (Android Studio 2020)

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ก.พ. 2025

ความคิดเห็น • 166

  • @ramuyamsani6461
    @ramuyamsani6461 4 ปีที่แล้ว +8

    I had some errors in my code and I was not able to solve it but this bro helped me a lot. I have messaged him the error on Instagram and he solved it.
    Thank you bro👍👍👍

  • @thiagoemidio8246
    @thiagoemidio8246 2 ปีที่แล้ว

    Assisti 200 Vídeos e esse foi o único que ajudou. Obrigado.
    Comunidade Brasil agradece.

  • @yaqeenhamadat100
    @yaqeenhamadat100 2 ปีที่แล้ว +1

    the string in 9:57 min ,dosent work with me
    what is solution ??
    there is 5 option
    1-create class string
    2-create enum string
    3-create inner string
    4-create interface string
    5-create type parameter string
    what to choose??
    I am a university student working on my graduation project. Please answer me

  • @dewanshyadav6033
    @dewanshyadav6033 3 ปีที่แล้ว +1

    Sir i have no errors in my code and app is storing data successfully but not retrieving .Please help.

  • @JunaidKhan-ht5jy
    @JunaidKhan-ht5jy 4 ปีที่แล้ว

    i was looking for same tutorial since one week ... Great job man thumbs up ..

  • @dichamthongangmei9099
    @dichamthongangmei9099 3 ปีที่แล้ว +1

    You're a life saver!! God bless you

  • @nishantnawadkar4324
    @nishantnawadkar4324 3 ปีที่แล้ว

    best video on youtube

  • @RizkiVlogTV
    @RizkiVlogTV 3 ปีที่แล้ว

    how to show this stuff inside navigation drawer ??

  • @nehavishwakarma4297
    @nehavishwakarma4297 3 ปีที่แล้ว

    UR video helped me a lot i was solving this since 1 month

  • @yanghao6457
    @yanghao6457 4 ปีที่แล้ว +1

    Really nice and clear teaching, thanks. unfortunately, I follow all but can't show the detail that entered. same problem with others.

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      Check logcat and let me know the error Or exception

    • @yanghao6457
      @yanghao6457 4 ปีที่แล้ว

      @@codingstuff070 Thanks for replying, E/eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
      this is logcat red shows only

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว +2

      Most of u r not able to retrieve data... It is causing mainly because of your model class varibles name. Make sure your model class varibles name must be same as child's or fields name in relatime db.

  • @avery_mort
    @avery_mort 4 ปีที่แล้ว +2

    Amazing vid.

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      Hey.... Check out new tutorial playlist of instag blog app where we are using firebase multiple services.
      th-cam.com/play/PLhhNsarqV6MTHwd8fttCrP2fRijuQ0dah.html

  • @munsum7618
    @munsum7618 2 ปีที่แล้ว

    do you know why mine crashed when i click on retrieve data ?

  • @некого-г8ъ
    @некого-г8ъ 2 ปีที่แล้ว

    is can retrieve data from firebase to multi users with this code?

  • @saltondirlys7926
    @saltondirlys7926 4 ปีที่แล้ว +1

    Hello there. Thank you for the tutorial on this, but I have minor problem. When I want to view the list of email/surname/name, it does not show on the ShowActivity. Can you help me?

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      Check logcat what exception Or error it is showing

    • @saltondirlys7926
      @saltondirlys7926 4 ปีที่แล้ว

      @@codingstuff070 E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      R u testing on samsung device

    • @saltondirlys7926
      @saltondirlys7926 4 ปีที่แล้ว

      @@codingstuff070 I tried it already on the emulator. Still does not show any of it. The data can send to firebase but its does not retrieve back when I press the "View List Button". It only display like "Name", "Surname" and "Email" but not the "blablagmail.com" that I previously send earlier.

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว +1

      Send me screenshot of ur code at instagram @codingstuff070

  • @CHRISSSSSLAM
    @CHRISSSSSLAM 4 ปีที่แล้ว +2

    it's good but how to know the data are showed in item.xml? cause my own can't show it

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      May be u have not inflated item Layout in adapter Or not finded id of wigdets in viewholder class.... If u want source code i can definitely provide u.

    • @CHRISSSSSLAM
      @CHRISSSSSLAM 4 ปีที่แล้ว

      @@codingstuff070 i done of my inflated, but it still can't show up the data, yes if u can.
      Or could u can help me to see??

    • @CHRISSSSSLAM
      @CHRISSSSSLAM 4 ปีที่แล้ว

      @@codingstuff070
      the code similar like this??
      View v = LayoutInflater.from(context).inflate(R.layout.item, parent, false);

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      @@CHRISSSSSLAM Source code - sanathgosavi.blogspot.com/2020/11/upload-data-in-realtime-database-and.html

    • @yanghao6457
      @yanghao6457 4 ปีที่แล้ว +1

      问题解决了么?我的也无法显示

  • @mosu95
    @mosu95 3 ปีที่แล้ว

    i tried to do this in a fragment however:
    when typing: adapter = new MyAdapter(this,list);
    15:08 it would show an error... anybody has any ideas why this doesn't work that well in a fragement? also the LinearLayoutManager won't work either
    also for some reason
    for (DataSnapshot dataSnapshot : snapshot.getChildren());{
    Model model = dataSnapshot.getValue(Model.class); won't work either... it says it cannot resolve symbol: 'dataSnapshot' on this line

  • @anuptarone3387
    @anuptarone3387 2 ปีที่แล้ว

    I don't have any error but when I click on show data, data is not displaying but linear layout is generated

  • @VishalKumar-sm8bo
    @VishalKumar-sm8bo 3 ปีที่แล้ว

    i m using fragment and my fragment_showActivity is not showing any data.... need help!!!

  • @CHRISSSSSLAM
    @CHRISSSSSLAM 4 ปีที่แล้ว

    hi its me again, i want to ask, if i want to display some specific data like category, can u do it (example: which car shop have provide service like oil, repair, wash, tire or some else.)

    • @CHRISSSSSLAM
      @CHRISSSSSLAM 4 ปีที่แล้ว

      ​ @CodingSTUFF if u know the solution, pls do the video or show the code ASAP🙏🏻

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      Yes we have done this query stuff in Instag blog app tutorial series. Checkout that tutorials

    • @CHRISSSSSLAM
      @CHRISSSSSLAM 4 ปีที่แล้ว

      @@codingstuff070 okey but i used the realtime database, is that same code of cloud firestore??

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      No both codes are different but firestore is better choice than real-time db.

  • @codingstuff070
    @codingstuff070  4 ปีที่แล้ว +2

    Most of u r not able to retrieve data... It is causing mainly because of your model class varibles name. Make sure your model class varibles name must be same as child's or fields name in relatime db.

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      @سلفي على منهاج النبوة we don't need setters as we are using hashmap nd saving the map data to firebase .... Also we have not created parameterize constructor... Cause we don't need that in this tutorial

  • @hhjghgghghbgjhbnjhhjhh
    @hhjghgghghbgjhbnjhhjhh 2 ปีที่แล้ว

    how to retrive value using addchildvalueeventlistene() plz guide me

  • @Blober
    @Blober 3 ปีที่แล้ว

    Im getting this error any help ? com.google.firebase.database.DatabaseException: Can't convert object of type java.lang.String to type com.example.database.Model

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      Source code is in the description box... Try to match ur code with it... If Still get error let me know...

  • @عبدالكريمالمطيري-ه2د
    @عبدالكريمالمطيري-ه2د 3 ปีที่แล้ว

    hi i follow your steps but my project just retrieve a names without emails or surnames i don't know why ?can you help me?

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      Send me ur code at Instagram @codingstuff070

  • @amirchernin7254
    @amirchernin7254 3 ปีที่แล้ว +1

    Can you add the correct ShowActivity source code? I'm struggling with it and the file on the website is the same as MainActivity.

  • @amalrosh2393
    @amalrosh2393 4 ปีที่แล้ว

    Am getting error inside for loop(addValueEvent) in the line :
    Model model= dataSnapshot.getValue(Model.class);
    Can u help me, I checked that in db same var name is given

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      What error is saying...?

    • @amalrosh2393
      @amalrosh2393 4 ปีที่แล้ว

      @@codingstuff070 app is crashing

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      @@amalrosh2393 yes man but what error is saying in logcat

    • @amalrosh2393
      @amalrosh2393 4 ปีที่แล้ว

      @@codingstuff070 I will watch the video again, and will ask you if error is not gone

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว +1

      @@amalrosh2393 ok

  • @DanishKhan-ib2bo
    @DanishKhan-ib2bo 4 ปีที่แล้ว +1

    i get error in context:this
    please help me

  • @yq5687
    @yq5687 3 ปีที่แล้ว

    how to pass the data received by recyclerview from firebase realtime database to antother activity

  • @thegamingprofile6797
    @thegamingprofile6797 3 ปีที่แล้ว

    my app crashes when i press the button to show the data

  • @vishrutgoyani8071
    @vishrutgoyani8071 3 ปีที่แล้ว

    What if I want to get all data in random order?
    Like I have 5 items & I want like 2, 4, 31, 5.
    Can you help mw with that please?

  • @votingapp9698
    @votingapp9698 3 ปีที่แล้ว

    It's almost working, but the text on the item layout that should be changing is not working.

  • @Anonymous-fo2rv
    @Anonymous-fo2rv 3 ปีที่แล้ว

    if I have several subchildren in my db . how can we iterate through each one?

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      Using for loop u can iterate through

    • @Anonymous-fo2rv
      @Anonymous-fo2rv 3 ปีที่แล้ว

      @@codingstuff070 actually i tried the code but i am not able to see anything........i am getting a blank screen

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      Send me photos of ur code at Instagram.... @codingstuff070

  • @iliji8471
    @iliji8471 3 ปีที่แล้ว

    Can we use the same code for firestore?

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      No..... Little bit changes there .... U can watch this tutorial series
      th-cam.com/play/PLhhNsarqV6MSIVonypROq0gxcOLxbUDNR.html

    • @iliji8471
      @iliji8471 3 ปีที่แล้ว

      @@codingstuff070 nice! thanks you very much

  • @AirMiloTakManis
    @AirMiloTakManis 4 ปีที่แล้ว

    My textview in cardview does not display any data but the number of cardview that appears is the same as the number of data in database

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว +1

      Most of u r not able to retrieve data... It is causing mainly because of your model class varibles name. Make sure your model class varibles name must be same as child's or fields name in relatime db.

    • @AirMiloTakManis
      @AirMiloTakManis 4 ปีที่แล้ว

      @@codingstuff070 just found the solution to my problem. I just created a new model java class file and it seems to be working now. Thank you brother 🙏🏻

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      Watch our new tutorial series to understand firebase in detail.
      th-cam.com/play/PLhhNsarqV6MTHwd8fttCrP2fRijuQ0dah.html

    • @deepanshudutta4443
      @deepanshudutta4443 3 ปีที่แล้ว

      Sir thank u so much.I just stuck on the same problem but fixed it with the help of your solution 🙏🙏

    • @deepanshudutta4443
      @deepanshudutta4443 3 ปีที่แล้ว

      @@codingstuff070 Sir thank u so much.I just stuck on the same problem but fixed it with the help of your solution 🙏🙏

  • @rusyidahazri1378
    @rusyidahazri1378 3 ปีที่แล้ว

    Hi sir. I need some help, because I got an error saying 'from(android.content.Context)' in 'android.view.LayoutInflater' cannot be applied to '(com.google.firebase.database.core.Context)'

  • @lokeshreddy1257
    @lokeshreddy1257 3 ปีที่แล้ว

    I am getting error at getvalue and app is crashing how can I solve it

  • @bishri88
    @bishri88 4 ปีที่แล้ว

    Hi its a nice video. How to retrive recent data that has been register recently at the top of recycler view. I saw that recent data go at the last of the view?

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      When u store the images in firebase add time stamp as well .. Then while Retrieving the data apply query orderBy and pass the "time" There.

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      Watch this video while uploading
      th-cam.com/video/dN7DLjQWezc/w-d-xo.html
      And this while retrieving.. U will get the idea
      th-cam.com/video/M3TrtarRIV0/w-d-xo.html

    • @bishri88
      @bishri88 4 ปีที่แล้ว

      ok i will check it out. I have one more query that in recycler view how we can add the time like i post something and it comes to recycler view and should show 1 sec ago ... 1 min ago relative to time.. any idea??

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      By that server timestamp u can evaluate the time.
      SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd G 'at' HH:mm:ss");
      Date past = format.parse("2016.02.05 AD at 23:59:30");
      Date now = new Date(); long seconds=TimeUnit.MILLISECONDS.toSeconds(now.getTime() - past.getTime());
      long minutes=TimeUnit.MILLISECONDS.toMinutes(now.getTime() - past.getTime()); long hours=TimeUnit.MILLISECONDS.toHours(now.getTime() - past.getTime()); long days=TimeUnit.MILLISECONDS.toDays(now.getTime() - past.getTime()); // // System.out.println(TimeUnit.MILLISECONDS.toSeconds(now.getTime() - past.getTime()) + " milliseconds ago"); // System.out.println(TimeUnit.MILLISECONDS.toMinutes(now.getTime() - past.getTime()) + " minutes ago"); // System.out.println(TimeUnit.MILLISECONDS.toHours(now.getTime() - past.getTime()) + " hours ago"); // System.out.println(TimeUnit.MILLISECONDS.toDays(now.getTime() - past.getTime()) + " days ago"); if(seconds

  • @thierryklougbo9000
    @thierryklougbo9000 3 ปีที่แล้ว

    Thanks for this video bro!

  • @nurulafiqahbintihamzah9605
    @nurulafiqahbintihamzah9605 4 ปีที่แล้ว

    I have follow all steps in this video but why my recyclerview not showing any data when i run it?

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      Check logcat nd try to match with source code. Source code is in the description box

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      Most of u r not able to retrieve data... It is causing mainly because of your model class varibles name. Make sure your model class varibles name must be same as child's or fields name in relatime db.

  • @ma.patriciabriones5442
    @ma.patriciabriones5442 4 ปีที่แล้ว

    good day. i got this error " java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference
    at com.example.bill.MyAdpter.getItemCount(MyAdpter.java:50)" how to solve this ?

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว +1

      May be u forgot to initialize Arraylist

  • @arvitoputra6626
    @arvitoputra6626 3 ปีที่แล้ว

    bro why realtime firebase are not showing any data???

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      Where in firebase console Or in ur app

    • @arvitoputra6626
      @arvitoputra6626 3 ปีที่แล้ว

      @@codingstuff070 firebase console bro, they only showing null

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      Send me photo of it on Instagram @codingstuff070

    • @arvitoputra6626
      @arvitoputra6626 3 ปีที่แล้ว

      @@codingstuff070 already sent it bro

  • @jhenkarkc040
    @jhenkarkc040 3 ปีที่แล้ว

    Sir, I followed your instructions ,But the number of users are correctly shown in card view but the values of the users was not displaying please help me I am new to Android Studio

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      Match ur model class variables name with firebase child field values. For ex. If it is Name in firebase then make ur model class variable exactly same as Name

    • @jhenkarkc040
      @jhenkarkc040 3 ปีที่แล้ว

      @@codingstuff070 Thank You Sir

  • @zhixin7314
    @zhixin7314 4 ปีที่แล้ว

    I got an error on word 'context' in line 'View v = LayoutInflater.from(context).inflate(R.layout.list_layout,parent,false);'
    The error msg said the required type is 'android.content.Context' but provided 'com.google.firebase.database.core.Context'
    Please help me QwQ

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      Important Context from android.content.Context

    • @zhixin7314
      @zhixin7314 4 ปีที่แล้ว

      @@codingstuff070 Thank You so much!!

  • @x_cyborg5846
    @x_cyborg5846 3 ปีที่แล้ว

    Hey bro i have followed your tutorial , It is really amazing . But I had a got into an error where my database isnt been displayed when i click on the button2(showactivity) it comes out from that activity and doesnt display anything. Even the class which i have created similar to model class inserts the data to database but not in my showActivity class. It will be helpful if you help me out!!. Please help

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      Show me ur code photos on Instagram at @codingstuff070 .... When u add onClickListner on button 2

    • @x_cyborg5846
      @x_cyborg5846 3 ปีที่แล้ว

      @@codingstuff070 Sure bro , I actually need your email so that i could send you my docx file with pictures included :)

  • @hemanthsmanjunath21
    @hemanthsmanjunath21 3 ปีที่แล้ว

    bro can u plz provide me dependencies for recycler view

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      "androidx.recyclerview:recyclerview:1.2.1"

    • @hemanthsmanjunath21
      @hemanthsmanjunath21 3 ปีที่แล้ว

      @@codingstuff070 bro i am getting empty screen in showactivity
      i am try from morning to fix issue bt i am not able to fix
      bro plz help me

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      Send me ur code photos on Instagram @codingstuff070

    • @hemanthsmanjunath21
      @hemanthsmanjunath21 3 ปีที่แล้ว

      @@codingstuff070 thank you so much bro for fixing my code

  • @samirdesigner3324
    @samirdesigner3324 4 ปีที่แล้ว

    thanks bro
    make part3
    add image with upload data text and when retrivea data show image and when click on open new activity show data with image
    thanks again

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      It's already done man.... Instag blog app tutorial series is finished with 13 parts. Check complete playlist.

    • @samirdesigner3324
      @samirdesigner3324 4 ปีที่แล้ว

      @@codingstuff070 thanks

  • @rayan6051
    @rayan6051 2 ปีที่แล้ว

    how i can add image

    • @codingstuff070
      @codingstuff070  2 ปีที่แล้ว

      th-cam.com/video/9-oa4OS7lUQ/w-d-xo.html

  • @bhaiteraworrior6817
    @bhaiteraworrior6817 2 ปีที่แล้ว

    i have error please help me

  • @yogesha9834
    @yogesha9834 4 ปีที่แล้ว

    Bro how to retrieve current user details?

    • @codingstuff070
      @codingstuff070  4 ปีที่แล้ว

      If u have already authenticated user.... U can get his data using auth.getCurrentUser we have done this in Instag blog app tutorial series.........
      th-cam.com/video/b1sHQpwJzVU/w-d-xo.html

  • @dilshodiskandarov7144
    @dilshodiskandarov7144 3 ปีที่แล้ว

    Katta rahmat bro

  • @divyanksharma236
    @divyanksharma236 ปีที่แล้ว

    cool

  • @graceminai9041
    @graceminai9041 2 ปีที่แล้ว +1

    This will work fine but you'll encounter an error when it comes to retrieving the data. It won't display on the textviews inside the card view. If you want to solve this challenge, use create a constructor for the model class an use it to upload the data to the firebase realtime database. Do not use the hashmap

    • @codingstuff070
      @codingstuff070  2 ปีที่แล้ว

      While uploading u can use hasmap or Java object while updating u can only update value using hashmap while retrieving u should create model class or u can get specific field values using key.

  • @Invisible_Programmer
    @Invisible_Programmer 2 ปีที่แล้ว

    Pls do videos in kotlin too

  • @balibramzi3806
    @balibramzi3806 3 ปีที่แล้ว

    Hi sir! How to retrieve video + thumbnail from real time database in android studio?

  • @adityarevankar6529
    @adityarevankar6529 3 ปีที่แล้ว

    The data showing "DOUBLES" every time you make an entry.

  • @nerwinalamas1334
    @nerwinalamas1334 3 ปีที่แล้ว

    thank you bro

  • @LokyVanHelsing
    @LokyVanHelsing 3 ปีที่แล้ว

    i dont know why but following this method the app shows me only one value

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      Bro ur model class variable should exactly match to firebase field values

  • @raselranacse
    @raselranacse 3 ปีที่แล้ว

    Thanks

  • @abdullahabdulsattar1832
    @abdullahabdulsattar1832 3 ปีที่แล้ว

    Nice Work my Friend, Can you hare .xml files aswell.

  • @adityarevankar6529
    @adityarevankar6529 3 ปีที่แล้ว

    even my data is showing two times

  • @sriwari4542
    @sriwari4542 3 ปีที่แล้ว

    I Don't have getName, getSurname, getEmail.

    • @sriwari4542
      @sriwari4542 3 ปีที่แล้ว

      Please help me fast

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      What

    • @sriwari4542
      @sriwari4542 3 ปีที่แล้ว

      @@codingstuff070 to get getName, getSurName,getemail.

    • @sriwari4542
      @sriwari4542 3 ปีที่แล้ว

      @@codingstuff070 in My adapter java file

    • @codingstuff070
      @codingstuff070  3 ปีที่แล้ว

      Create model class for that

  • @HarishFigen
    @HarishFigen ปีที่แล้ว

    s

  • @x_cyborg5846
    @x_cyborg5846 3 ปีที่แล้ว

    I got into a problem where i couldn't retrieve the data back but you my friend saved me . You helped me through . Thank you for your help ✨
    Guys this guy is amazing!! . Do subscribe to his channel make him reach 1M.
    You really deserve it!!

  • @tusshargoyal1080
    @tusshargoyal1080 3 ปีที่แล้ว

    java.lang.ClassCastException: androidx.constraintlayout.widget.ConstraintLayout cannot be cast to androidx.recyclerview.widget.RecyclerView
    how to solve it?

  • @ytshortsdekho
    @ytshortsdekho 3 ปีที่แล้ว

    my app crashed when i open showactivity please help me

  • @saurabhdhote8170
    @saurabhdhote8170 3 ปีที่แล้ว

    Thanks

  • @reagankasendwa
    @reagankasendwa ปีที่แล้ว

    Thanks