Testing Fragments with Dagger-Hilt - Testing on Android - Part 12

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

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

  • @chanwo_opark
    @chanwo_opark 4 года назад +15

    Thanks for going through that awfully long function Philip! Appreciate you taking the time to analyze it line by line, understanding things makes me feel much more confident about the material.

  • @jackli1924
    @jackli1924 Год назад +1

    amazing and informative video as usual, Thank you Philipp! You always teach and explain things concisely and understandable!

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

    For those getting the following error `Activity never becomes requested state "[DESTROYED, RESUMED, STARTED, CREATED]" (last lifecycle transition = "PRE_ON_CREATE")` but sure to :
    - Enable autostart in app setting
    - Grant the permission to "Display pop_up windows while running in the background" from app permission settings

  • @fausto7394
    @fausto7394 3 года назад +4

    11:15 I couldn't find EmptyFragmentActivity In fragment_version 1.3.3 so I downgraded to 1.3.0-alpha08 (same as yours in this video)

  • @Alchemist10241
    @Alchemist10241 3 года назад +1

    Thanks a lot. I learned many things through this video to develop my own APIs. well done 👍

  • @thomasknee7844
    @thomasknee7844 3 года назад

    Thanks, this video and others of yours is super helpful for my new job role. Subscribed mate

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

    Thank you so much for making it easy to understand. God bless you.

  • @muhammadsarimmehdi
    @muhammadsarimmehdi Год назад +1

    Unresolved reference: FragmentScenarioEmptyFragmentActivityTheme

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

    Everything went above my head

  • @safionweb
    @safionweb 3 года назад +1

    Why do we need to create a debug source set for the HiltTestActivity? Can't we place this activity in test source itself?

  • @davemoloney1
    @davemoloney1 3 года назад

    Lifesaver. Great video & really well explained.

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

    This video is a life saver!

  • @johnybaby9574
    @johnybaby9574 3 года назад +1

    well unfortunately should find for latest testing videos.

  • @OlivierGeorg
    @OlivierGeorg 3 года назад +2

    With androidx.fragment:fragment-testing:1.3.0-rc02, EmptyFragmentActivity is now internal. Any work around or new procedure?

    • @enomamichael5762
      @enomamichael5762 3 года назад +9

      putExtra(
      "androidx.fragment.app.testing.FragmentScenario.EmptyFragmentActivity.THEME_EXTRAS_BUNDLE_KEY",
      themeResId
      )

    • @rimag228
      @rimag228 3 года назад

      Enoma's didn't work for me (it did for others) but removing the themeResId parameter and the putExtra line entirely made this work. You use default styles then, but for this that's fine.

  • @qolanitheko881
    @qolanitheko881 3 года назад

    Thank you.
    Is there a way to have dual pane fragments for tablets using navigation graph?

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

    Wow amazing the knowledge you have achieved, i try to understand all the stuff in this function but I have begginer knowledge of Kotlin language and there are so many keywords and other stuff I don't know how it works. I know that you try to explain the best but this has been difficult for me to understand it with the speed of the coding

  • @uchennachukwuwa9789
    @uchennachukwuwa9789 3 года назад +1

    Thanks this was very very very helpful

  • @pradeepkumarreddykondreddy7048
    @pradeepkumarreddykondreddy7048 3 года назад +1

    How to launch activities using dagger-hilt ?

  • @hevilprajapati7459
    @hevilprajapati7459 3 года назад

    Hi @Philip, Thank you for the video but while implementing i got this error -> "java.lang.IllegalStateException: No instrumentation registered! Must run under a registering instrumentation."
    Please guide on it. HiltTestRunner class is not being used.

  • @syednoorullahshah9194
    @syednoorullahshah9194 3 года назад

    i feel lost here :D anyways great effort mate !

  • @timelord94
    @timelord94 3 года назад +1

    what if I'm working with modular android development? Where should I put the manifest file?

  • @sidharthv924
    @sidharthv924 4 года назад +1

    🔥🔥🔥

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

    Thanks

  • @amirhosseinparhizgar4528
    @amirhosseinparhizgar4528 3 года назад

    great job! thank U so much

  • @ashrafmakandar3370
    @ashrafmakandar3370 4 года назад +1

    hi sir please make a video on push notifications on background which when comes should show custom dialog even when app is closed or killed

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

    Awesome though it's 2023. Does hilt have any solution now in 2023?

  •  3 года назад

    In my case I had to add this line in gradle:
    debugImplementation "androidx.fragment:fragment-testing:1.3.5"

  • @mustafaammar551
    @mustafaammar551 3 года назад

    Thank you Bro

  • @jiwomdf8244
    @jiwomdf8244 4 года назад

    Thank you so much

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

    If anyone getting error after implementing this , try deleting .gradle file and then invalidate cache and restart.

  • @alij3fer
    @alij3fer 4 года назад

    Thanks 🔥😍

  • @stephenmorgan5786
    @stephenmorgan5786 3 года назад

    Someone else commented about this as well, but FragmentScenario.EmptyFragmentActivity.THEME_EXTRAS_BUNDLE_KEY isn't available. I'm just going to put a generic name in there for now. I haven't finished the vid yet though, so I'm not sure if it will work.

    • @enomamichael5762
      @enomamichael5762 3 года назад +3

      putExtra(
      "androidx.fragment.app.testing.FragmentScenario.EmptyFragmentActivity.THEME_EXTRAS_BUNDLE_KEY",
      themeResId
      )

    • @akashdeepwadhwa5828
      @akashdeepwadhwa5828 3 года назад

      @@enomamichael5762 thanks for your effort where did u get that solution and where can i get explanation for that

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

      EmptyFragmentActivity is now standalone (its not part of FragmentScenario), remove FragmentScenario. before EmptyFragmentActivity, and it'll import.

  • @ivankvych8182
    @ivankvych8182 3 года назад

    Wow, cool))

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

    "below"

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

    val mainActivityIntent = Intent.makeMainActivity(
    ComponentName(
    ApplicationProvider.getApplicationContext(),
    HiltTestActivity::class.java
    )
    ).putExtra(FragmentScenario.EmptyFragmentActivity.THEME_EXTRAS_BUNDLE_KEY, themeResId) why here EmptyFragmentActivity is not showing in the suggestion in android studion in HiltExt.kt file

  • @dendroid4389
    @dendroid4389 Год назад +1

    Thanks for such a great tuts, Philipp!
    Although I put 'extpoted="false"' in debug manifest explicitly, I always get "android:exported needs to be explicitly specified for element " error when running test. Anybody else stuck to such an error? Has anyone got any decision?