Dagger 2 @Module, @Provides, @Binds Annotation Tutorial - CheezyCode (Hindi) #5

Поделиться
HTML-код
  • Опубликовано: 9 янв 2025

Комментарии • 70

  • @arnavramidi
    @arnavramidi Год назад +13

    I'm actually blown away by these videos. Every second of these videos has value. No time is wasted. Unless a person really understands a concept thoroughly he or she can't explain in lay man terms. I have several years of experience but I found it tough to grasp Dagger and I could only understand bits and pieces of it from other sources. These videos helped me to put the pieces together. Bhayya,, pun aside, Desi brothers are the best to get the essence out of any thing. It's not the summary, it is the essence. Thanks!

  • @Punarjagran
    @Punarjagran Год назад +3

    coroutine bhi aapsei samjha,
    dagger bhi..
    Lord ho aap, itna accha samjhate ho..
    aapka din shubh ho :D

    • @CheezyCode
      @CheezyCode  Год назад +2

      🙏...bas ghamand na ho jaye...😂

  • @sopnilshinde985
    @sopnilshinde985 9 месяцев назад +1

    nice series , I am loving it, I was thinking , how much efforts you are taking for this community

  • @sagaravhad5198
    @sagaravhad5198 9 месяцев назад

    You are matchless. the way you arranged the topics and explained in simple language, I fall in love with your channel. teach me everything in computer science. ❤

  • @santoshs490
    @santoshs490 2 года назад

    Thanks!

  • @akashkumardas6521
    @akashkumardas6521 Год назад

    ab lagta hai interview clear ho jayega... thank you sir

  • @sarthakgiri4596
    @sarthakgiri4596 9 месяцев назад

    Truely wonderful explanation

  • @devatrii
    @devatrii Год назад

    Love your content❤ :). Always learning something new...

  • @xitize
    @xitize 2 года назад

    bahot achhe se samjhate ho guru. marvelous!!

  • @akashverma-li1jk
    @akashverma-li1jk 2 года назад

    best for videos for interview preparations

    • @CheezyCode
      @CheezyCode  2 года назад +1

      Thanks and All the best

  • @santoshs490
    @santoshs490 2 года назад

    nicely explained Thanks!!

  • @dluxsoft2840
    @dluxsoft2840 2 года назад

    you are amazing....

  • @abhayjaiswal5820
    @abhayjaiswal5820 2 года назад

    Wonderful explanation.

  • @YesICode
    @YesICode 2 года назад

    As always, easy to understand🦸‍♂️

  • @Fungo_00go
    @Fungo_00go 2 года назад

    Thank you for this! Super cool video! A+++

  • @sunu46
    @sunu46 2 года назад +1

    Bro … big fan of yours. Was waiting for dagger from sometime. Thanks a lot. One request. If possible can you please do a series on Rx libraries as well. Thanks in advance.

  • @RamapatiMaurya
    @RamapatiMaurya 2 года назад +1

    Thanku for creating such video!
    I have one question.
    If requirements like get the data from Sqlrepository and then send it to FirebaseRepository then what approach we can apply?

  • @afzal_sheikh0
    @afzal_sheikh0 2 года назад +1

    Hello. Please add a detailed comparison between @provides and @binds. Its making me confused. Where to use which one? and best among both of them? between thanks brother for sharing such a easy explanation of Dagger. It was too hard for me to understand but you really made my life easy

    • @CheezyCode
      @CheezyCode  2 года назад +8

      @Binds - for binding Interface with Implementation.
      @Provides - where you will be executing some logic to create the object.
      Best kuch nahi hai - requirement dependent hai....Try to use @Binds if interfaces are there, otherwise to @Provides he use karna padega

  • @saeedsharif2463
    @saeedsharif2463 Год назад

    sir firbase repository b khod si bnasakta hain agr inject lagai to ?

  • @2chotti
    @2chotti 6 месяцев назад

    thank you

  • @digvijaysingh1328
    @digvijaysingh1328 2 года назад +1

    Hi, one confusion, if we need both type of user repository on runtime, what will we do.
    Phale aapne firebaserepo hi return kari phir sqlrepo userrepositorymkdule se, so ye like hard-coded sa na ho gya.

    • @CheezyCode
      @CheezyCode  2 года назад +1

      Next video ka intezar kare

  • @TheS3101
    @TheS3101 2 года назад

    Hi..I have a question for this video - agr dono @Field ho to kese differentiate krenge ki kisko use krna hai....yaha to ek br field ke saath or ek constructor ke saath kra aapne but jab 1 sae jada @Field injection hogi to unki calling ko kese differentiate krenge.

    • @CheezyCode
      @CheezyCode  2 года назад

      Question nahi samjha aapka...ek baar dobara phrase karna...shayad help kar pau

  • @TheAqib57
    @TheAqib57 2 года назад

    ❤️❤️

  • @prasannadeshpande4435
    @prasannadeshpande4435 2 года назад +1

    You should have shown code of Main Activity in this video too.

  • @junigates
    @junigates Год назад

    what if we pass 2 params in bind function, how dagger will know what param to bind with its return type 1st or 2nd?

  • @junigates
    @junigates Год назад

    What if we need both firebase and SQL services in module?

  • @vinodaraaj
    @vinodaraaj 10 месяцев назад

    😍

  • @mh46_riderr
    @mh46_riderr 2 года назад

    hey man thanks for sharing your wonderful knowledge with us. I appreciate your time and effort sirji.
    Just one question in my mind,
    There are 2 ways we can acheive DI in our code one is normal one and another one is with dagger.android....confused which one to follow??

    • @CheezyCode
      @CheezyCode  2 года назад

      Thanks for your comment.
      Normal one is the preferred one but dagger android has been used extensively. Some recommend using Dagger.Android with Android - some hate it. I prefer the normal one - easy to understand and easy to implement. But now HILT is the preferred choice due to its ease.

    • @mh46_riderr
      @mh46_riderr 2 года назад

      @@CheezyCode Thank you so very much brother... normal one is easy to implement..
      Thanks again 🙏

  • @maxmk2669
    @maxmk2669 Год назад

    Is it possible to make this line of code "class RepoRepositoryImpl @Inject constructor(private val repoApi: RepoApi) : RepoRepository" into "class RepoRepositoryImpl : RepoRepository { @Inject lateint var repoApi: RepoApi }" this code??

  • @shubhamshrivastava1467
    @shubhamshrivastava1467 2 года назад +1

    bhaiya yeh playlist mai kitna video approximately ayega?

  • @vishalvala5553
    @vishalvala5553 2 года назад

    hello this is very good explanation but i have one doubt. how to set notification type at run time like send emailNotification or messageNotification? i am confused here.

    • @CheezyCode
      @CheezyCode  2 года назад +1

      Watch the whole series...you will get the idea...covered it already in the series

  • @onlyyoutube8269
    @onlyyoutube8269 2 года назад

    sir isme to apne bata diya ki hame notification kaunsi kaise batani hai....lekin agar humko dono kam matlab db aur firebase dono me send krna hai ek sath ya phir dono mese koi ek to vo kaise krenge kyuki isme to ek bar me ekto db me save hoga yato firebase me

    • @CheezyCode
      @CheezyCode  2 года назад +1

      Multibinding wali video hai - ussi mei covered hai ye ruclips.net/video/20PRMhtCRbM/видео.html

    • @onlyyoutube8269
      @onlyyoutube8269 2 года назад

      @@CheezyCode Thankyou for your response... ❤️

  • @telugucartoonchannel2916
    @telugucartoonchannel2916 2 года назад

    Please provide some definations please

  • @jrProfessorRider
    @jrProfessorRider Год назад

    @Module
    class UserRepositoryModule {
    @Provides
    fun getFirebaseRepository(): UserRepository {
    return FirebaseRepository()
    }
    @Provides
    fun getSQLRepository(sqlRepository: SQLRepository): UserRepository {
    return sqlRepository
    }
    }
    can we use both and user store data in local and server-------- its is possible or not

    • @CheezyCode
      @CheezyCode  Год назад

      Inject both the repositories to implement that behavior

  • @muhammadaqeel2946
    @muhammadaqeel2946 2 года назад

    Can you make a detail video on hilt dependency injection?

    • @CheezyCode
      @CheezyCode  2 года назад

      For sure...Dagger 2 foundation hai...uske baad HILT he karege

  • @afaaqahmed1697
    @afaaqahmed1697 2 года назад

    Bro ap bht acha samjhaty Ho But Aik Confusion H MVVM Use Krry ya Dependency Injection , Ya dono ko hi Use Krrry Essy To Code Bht hi Complex Lggy Ga, I am Confuse for this🤔😢

    • @CheezyCode
      @CheezyCode  2 года назад

      😃 confuse mat ho ...cover karege DI with MVVM

    • @afaaqahmed1697
      @afaaqahmed1697 2 года назад

      @@CheezyCode Waiting For that Bro me bs pro bnny hi wala hn android me😁🤞

  • @LalitSharma-vo2dr
    @LalitSharma-vo2dr 2 года назад

    please make video on rx java

  • @sanjayshowvedio
    @sanjayshowvedio Год назад

    please make details video and speed of video should be slow

    • @CheezyCode
      @CheezyCode  Год назад

      Isse detailed nahi ho payega...

  • @rishabhgupta655
    @rishabhgupta655 11 месяцев назад

    no way it help other developer to understand easier, it become more coplicated

  • @shivamrana3143
    @shivamrana3143 2 года назад +1

    compiler shows error ---> com.example.daggerandhilt.UserRepositoryModule is listed as a module, but is not annotated with @Module
    @dagger.Component(modules = {com.example.daggerandhilt.UserRepositoryModule.class, com.example.daggerandhilt.NotificationServiceModule.class})
    i don't know why

    • @Akash-Bisariya
      @Akash-Bisariya Год назад

      I think you may be adding incorrect module class in component.

  • @krris74
    @krris74 2 года назад

    fun inject(mainActivity: MainActivity) when i put this code , the application is giving error " A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction" why so ??

    • @CheezyCode
      @CheezyCode  2 года назад

      Somewhat related to Kotlin version...can you try updating the Kotlin version? Might need to google this error as well...not specific to dagger

    • @pulkittb7
      @pulkittb7 2 года назад

      Did you find solution for this? I am struck at this error.

    • @foxriderzero
      @foxriderzero Год назад

      @@pulkittb7 replace dagger version from 2.40.5 to 2.45