Android onActivityResult is Deprecated. What Do I Do Now?

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

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

  • @CodingDemos
    @CodingDemos  3 года назад +6

    Hey guys, I hope you liked this tutorial :)
    Comment below on topics you want me to cover next.

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

      How to update if there is a line on startforActivity?

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

    Couldn't get my head around this until I came across your video. To the point and well presented! My thanks sir!

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

    Amazing! This is the best way I found on the internet to get an image. Well done mate!

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

    Great video. I tried getting a grasp of the new way with a few other places and documents but this so far has been the simplest. Very nicely and systematically explained.

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

      Thank you. I'm happy to hear that 😃

  • @astraton2001
    @astraton2001 3 года назад +5

    this is the reason why I stopped developing for mobile devices. Every time you finished a project, half of the used methods are already deprecated. This is really not fun anymore.
    Apple and Google wasting so much of our livetime.
    It's more about time to bring out some new OS for mobile devices independent from this big companies.

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

      Yeah, when I heard this, I was like what? Why don't they just have the old codes link to the new. Never make a new coding that renders the old useless. What about good old apps, that developers passed away. This is crummy on their part.

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

      Yes, I'm frustaring about deprecated start Activity result. Old code it's work fines.

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

      @@ramaagusdwiputra1960 did u figure it out?

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

    Hi, I don't understand where bundle.get("data") gets from, is it a context, and where does it come from?

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

    Hi, may I know what if we need multiple request_code?
    And I noticed that you didn't pass the CAMERA_ACTION_CODE while launching the activity result launcher.

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

    nice tutorial, thank you so much. i hope i can see more useful video from your channel

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

    Thank You So Much For Such Awesome Tutorial.. You're Amazing.. 😀

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

    hey man, I would you like to thanks, this video was so nice and easy, thank you for all your explanation so clear.

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

    how to do this but in a fragment?
    i dont want the activity screen

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

    Can you show me any solution for onRequestPermissionsResult() is Deprecated on Fragment class ?

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

    nice tutorial..how would u integrate with crop image functionality...there are libraries but they seem to be not working in android 11 devices..is there any tutorial..pls point me in right direction..thx..

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

    Why after confirming an captured image from my app it will go crush? Plss reply

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

    Hi sir. Can you make classification image use tensorflowlite ?

  • @mr.cherrykim9897
    @mr.cherrykim9897 3 года назад

    how do you perform that inside fragment.
    please answer me if you read it will be a great help. Thanks .

  • @LC-gv5tn
    @LC-gv5tn 2 года назад

    Realy helpful, thank a lot

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

    I just learned the old way earlier from the doc. Then here I am now looking at the new way that is longer than the old. Why they make it too long for just a simple task. 😅

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

      Hi, exactly. Everyone kept on saying the same thing 🤣

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

    Excellent video!!! It's perfect

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

    Thanks for this tutorial ..

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

    Can you explain how to save the photo using gallery or camera into firebase storage and database with the new method?
    Also it seems like image picker libraries are based on the old method. That's a problem too

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

    how can i get the uri of image ? itried many times but it shows null.

  • @Аян-ш8з
    @Аян-ш8з Год назад

    How to import activityResultContracts?

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

    Great ! Video is helpful
    But would you please tell as how to get a good (real) quality for the captured photo ? with this code we get yet only a thumnail of the photo

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

    this was the easiest explanation. thank you. one question: if I need the Uri where do I get it in your code?

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

      Did you found the solution?

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

      @@marcelopontesmachado hey, I didn't end up using a Uri I changed the approach of the app because I could not find a solution.

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

    Could you make the same tutorial but with Explicet Intent please?
    &&
    Thank u for this fully explaniation in this great video 😊🇪🇬❤️

  • @ultimat.
    @ultimat. 2 года назад

    hello, I'm not looking for one of my tutorials. tutorials on external SQLite with source code and lots of explanations to fully understand. I would like a tutorial to be able to add an image, delete or modify an image in an external db.sqlite database. after a second tutorial. this one would display 2 or 3 categories which is in a db.sqlite categories table and which would open sub categories which belong to 2 and 3 which will also be found on an external db.sqlite base and a one click afterwards to display sub categories. here are just 2 tutorials that allow me to move forward thank you in advance.
    En java language please thanks you . merci

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

    Thank you! It works!!

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

    But I need one more thing I use this for capturing image.In deprecated method I get the Uri but I dont know how to get it.

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

    How would i get the uri ? as i need to upload the image to firebase

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

    Thanks for the tutorial. One thing, the condition:
    intent.resolveActivity(getPackageManager()) != null
    Can return null on android 11

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

    thanks a lot for this tutorial

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

    hey... thanks for the nice tutorial.... But what if I want to save this captured image, with high quality and with a costume name into my tablet's gallery???

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

      Hi, I'm glad you liked the tutorial. Currently, I don't have a video tutorial that covers that topic. You may refer to this Android doc on how to do it: developer.android.com/training/camera/photobasics

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

    Can you please tell me how to fetch the same image to another activity image view?

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

      Hi, you can use Android Intent to pass the image between activities. You may refer to this answer: stackoverflow.com/questions/41312365/how-to-get-an-image-from-one-activity-to-another

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

    Thanks it was helpful. Can you cover jetpack for java like how to use it and dependency injection.

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

      Hi, I'm glad that you liked the tutorial, and thank you for the topic suggestion.

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

    How to use in facebook login?

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

    Thanks it was useful

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

    thanks a very very lot

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

    Thank you

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

    git link please

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

      Here is the link to the full code: www.codingdemos.com/android-onactivityresult-is-deprecated-now-what/

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

    better not to use this new API cause you will loose results with "don't keep activities" enabled

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

    HI !great video!. I am able to do the same and it works as long as there is no grand child Activity involved. Have you tried launching a child Activity and then from that child Activity launching another one ? I have tried it and the grandchild Activity always returns RESULT_CANCELED. If you find a solution please post here . I found some other solutions online but they don't really work,

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

      Hi, I'm glad that you liked the video.
      No, I haven't tried that.

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

    Please provide your email if possible

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

      Hi, you may contact me through this form: www.codingdemos.com/contact-us