PASSING DATA BETWEEN ACTIVITIES - Android Fundamentals

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

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

  • @marcingrzyb1400
    @marcingrzyb1400 2 года назад +17

    There was no "bye-bye" in the end! There always is :) Your videos are just great, I never thought I'd be learning Android and now it actually seems easy. Thank you very much

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

      Same here. Once you get Android studio up and running it's smooth sailing. I actually finished creating a Firebase app and am receiving push notifications in my apps.

  • @orangasli2943
    @orangasli2943 2 года назад +7

    Serializable is the methodology for java virtual machine to convert object or primitive data type into an array of bytes..
    This is useful for sending data from one file into another..
    It doesn't matter whether they are(the files) in the same directory or over the network..
    Because data must be break into chunks like an array of bytes where each element is one byte..
    They need to be sent via the OutputStream
    ..
    So that's why it was called a stream
    Because it's like byte by byte is flowing through the buses from a file into another file
    From a region of the hard disk into another region of the hard disk via the Ram

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

    Your tutorials are awesome man! It is so informative! Keep making these amazing videos! Thank you!

  • @marc988
    @marc988 2 года назад +5

    Nice work. But Please, would you like to add timelines next time? It will help people to better watch the different parts of the video according to what they need to understand (UI design or coding...or else) and to navigate whenever they wanna go forward or backward to watch something something.
    Once more, thanks! 👏👏👏

  • @ghostfreak1902
    @ghostfreak1902 4 года назад +2

    Thx so much for all these great videos and explenations
    way better than my teacher and all 😅
    i learn a lot here :p.

  • @filip_g
    @filip_g 4 года назад +6

    So this is PASSING DATA BETWEEN ACTIVITIES basic level. What would you say are advanced and pro level characteristics of this subject? Do you have any videos deconstructing data classes and other ways of accessing data? Thank you for videos and I would be very thankful for your reply.

    • @PhilippLackner
      @PhilippLackner  4 года назад +7

      checkout parcelables. With those you can pass data classes as extras.

  • @erica-wo7iq
    @erica-wo7iq 4 года назад +4

    you have no clue how much these videos are helping me!

  • @janihirvinen7832
    @janihirvinen7832 2 года назад +2

    What a great lectures you have. Keep on going. What about if you want to pass data from mainactivity to a fragment that is running in ViewPager2? I have looked few of your slide vids but none of them send values to fragments

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

    Excellent couse, very helpful, regards from Venezuela

  • @agilsantosa5629
    @agilsantosa5629 4 года назад +2

    Thanks, always update

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

    Nice.All clear with your explanations . Thanks

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

    Thanks very much! You are my new best friend!

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

    Thanks a lot, it was a great video. My IDE tells me getSerializableExtra is deprecated, could you please suggest something new to pass objects between Activities?

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

    Hey thanks! Your video is very helpful.

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

    best tutorial ever!!!

  • @최영수-r3m
    @최영수-r3m 3 года назад

    cool!! Thank you so much!!! this video just saved my life xD

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

    Neat. A great lecture!

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

    Mr.Poop killed me xdd

  • @guy1407
    @guy1407 4 года назад +2

    amazing data :)

  • @joinpsye7045
    @joinpsye7045 2 года назад +4

    Mr poop in China isn't 21 years old. I know him personally. )))

  • @rohitr.sekhar2195
    @rohitr.sekhar2195 3 года назад +1

    Shouldn't we be using Parcelable over Serializable to pass classes ?

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

    @Philipp Lackner thx for your content!
    But can you explain to me whats up with "SecondActivity::class.java"? I thought this is about kotlin? This "class.java" confuses me...
    And second how is "it" a reference to the "Intent" object? We never defined this variable "it".

    • @guitarcat01
      @guitarcat01 2 года назад +2

      Kotlin is a programming language built on top of Java, and it runs on JVM
      So essentially, a Kotlin class is a Java Class.
      "it" is used kind of a context inside the .also
      It is something simillar to say Intent(this, SecondActivity::class.java).putExtra("EXTRA_STRING", extraString), but the .also gets the whole setence and allow us to use only "it" to reference it

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

      it basically refers to the object of the extension fucntion

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

    Good Tutorial BUT when you leave age filed empty and click button, app is close immediately maybe it must have try catch?

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

      try val age = etAge.text.toString().toIntOrNull() on MainActivity.kt

  • @如炼截磨金
    @如炼截磨金 3 года назад +1

    How could we pass objects from one to another activity?

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

    Thank You, What 'also' does in android?

  • @tochukwuokey-munonye7884
    @tochukwuokey-munonye7884 4 года назад +1

    Nice, all my friends must subscribe..Can we also use sharedpreferences to pass details between activities.

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

    Hi, could I do it using pop up fragments?

  • @d.ndriotis9209
    @d.ndriotis9209 2 года назад +1

    Personal Note
    14:49 For java : public class Person implements java.io.Serializable {...}
    In java you can't define a class as data type class. You have to create your own methods if you want a data class.The disadvantage is that you end up with a lot of boilerplate code

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

    what's the difference between also vs apply vs run?

  • @shubhamsen7995
    @shubhamsen7995 4 месяца назад

    i'm facing problem while inserting my data in edit text not getting the data in text view of next activity pls help

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

    How to pass an Array of Person Class in intent between activities. Please tell.

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

    Hey! I have 3 activities say A,B,C I transition through A,B and then C but I want data from activity A to be brought to C how should I do that?

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

    EEEEExcelllent.thank you

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

    And what if i wanted to change a placeholder(%s) in strings.xml file with a putExtra?

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

    First off all, thx for your amazing work!!
    tvPerson.text = person.toString give you all the data of the class. is it possible, using "person", extract only one field? Example
    tvName.text = personne.name.toString
    tvAge.text = personne.age.toString..

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

    Pls make one video on findviewbyid in kotlin

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

    How did you grab the elements from the activity without using findViewByID?

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

      fiendViewById is used to reference views in Java. In kotlin you just reference them by their names.

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

    u neither use dataBinding nor viewBinding then how does it pick the id of xml, plz let me know

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

      he doesnt use view binding because view binding is new feature in android studio this video is relatively old he has new video on view binding but if you can follow along the video just use view binding instead i am following them and just using view binding
      here is the video that i was talking about :
      ruclips.net/video/z0F2QTAKsWU/видео.html&pp=ygUbdmlldyBiaW5kaW5nIHBoaWxpcCBsYWNrbmVy

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

    How to pass Image using this?

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

    i am struggling with view binding using it to pass the binding.tvPerson.text = personString
    keeps saying unresolved refrence:tvPerson . dont know what to do. Save me philipp:(

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

      Don't forget to add .toString() to the end of personString as well like this -
      binding.tvPerson.text = personString.toSring()

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

    serializable, putextra

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

    can I pass data to another activity without opening it and how to do it? just without "startActivity(it)" line?

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

      No why would you want to do that

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

      @@PhilippLackner I wanna pass data to custom toast, I tried to do it like this just for experiment, but I couldn't

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

    Okay but how can you make the data stays in the second activity even after closing the app so u can find them again?

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

      llocal DATABASE :)

    • @killerbidk477
      @killerbidk477 11 месяцев назад +1

      @followying392 my reply was long time ago when i didn't know what local database even meant that time xd thank you tho

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

    your contents are awesome but my negative mind often say that "there are many android programmers and many useful apps out there why you want to learn it"😞

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

      you can say that about everything. Let me tell you, there are so many trash developers out there, if you just put in the work and practice you're already ahead of so many of them. Most people are lazy af

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

      @@PhilippLackner thank you 🔥

  • @divyanshusharma5614
    @divyanshusharma5614 2 года назад +2

    pls provide source code

  • @gloria3216
    @gloria3216 5 месяцев назад +1

    Mr. Poop 🥲😍

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

    Like your contents, but I am just very confused that, why Mr.Poop and why China....Sounds very racism

  • @alroygama6166
    @alroygama6166 4 года назад +4

    Mr.poop😂😂

  • @GakisStylianos
    @GakisStylianos 4 года назад +8

    Hello man, I want to say that I really like your content and your Instagram account, but I have something I wanted to say about videos like these.
    The title is about passing data in activities, but then you spend approximately 4.5 minutes building the layouts. This I believe makes people less interested, or makes them click away.
    I would suggest that when you have a video with a specific title, you talk about that thing only. Building the views should be something that you shouldn't have to do every single video. It makes me feel like when I want to learn something, if it's you video I have to filter through a portion of the video which is irrelevant to get to them point that I am interested in.
    I just think you should be a bit more focused on what the title says and don't assume every single video that the viewer is an absolute beginner who has never opened Android Studio before.
    All this is just my opinion and I do not want you to take offense, I just think your content would improve if you did that :-)

    • @PhilippLackner
      @PhilippLackner  4 года назад +7

      Thank you so much for taking your time, comments like these help me the most to improve! What you said makes perfect sense and I will think about how I do it in future. The next Videos will still be like that because I pre produced them. But really, I wish I could get more constructive feedback like this

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

      ​@@PhilippLackner That is awesome, keep doing what you are doing, and I am sure you will just keep improving anyway!

    • @cherylm8210
      @cherylm8210 4 года назад +6

      I think it can be helpful for beginners (considering its android fundamentals and passing data between activities which is pretty basic, chances are there will be lots of beginners viewing). Maybe add a link to skip the making layout parts for more advanced viewers.

    • @akhileshrupaji5936
      @akhileshrupaji5936 4 года назад +4

      @@PhilippLackner I Have Just Started Android Studio... Please Give Content Very Basically... The Way the Videos are there in these playlist those videos are really understanding perfectly...Please Make videos from Scratch any type of concept give detailed Information ....Admin ...Really really ur Great... Love you From INDIA❤❤❤❤❤💗💗💗

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

      @@akhileshrupaji5936 thanks a lot, that's the right Playlist for you if you want basic android content 👍👍

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

    bye - bye

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

    sed for china

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

    Tutorial for Java? Someday? :(

    • @PhilippLackner
      @PhilippLackner  4 года назад +13

      Nope sorry, outdated for Android, won't come on my channel

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

    What about images, how to pass images, if u put a tutorial about passing data other than strings would that change whole meaning of a "FREE RUclips TUTORIAL", come on for once, why dont you youtube teachers put off the illusion of giving free educational tutorials which are of absolutely no use

    • @Muhammad_Waleed
      @Muhammad_Waleed 4 месяца назад

      I am all for freedom of speech but every once in a while people like you force me to reconsider.
      If you can't give constructive criticism then you shouldn't criticize at all

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

    Hi bro why doesn't my firestore query work when using the intent data passed? The query is get using an id from a shopping item but works when I get my own uid using the auth.getcurrentuser.getuid( ). Hope you can help.

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

    How to solve NullPointerException in serializable object? How can we put the default value?

  • @tochukwuokey-munonye7884
    @tochukwuokey-munonye7884 4 года назад

    Nice, all my friends must subscribe..Can we also use sharedpreferences to pass details between activities.

  • @tochukwuokey-munonye7884
    @tochukwuokey-munonye7884 4 года назад

    Nice, all my friends must subscribe..Can we also use sharedpreferences to pass details between activities.

  • @tochukwuokey-munonye7884
    @tochukwuokey-munonye7884 4 года назад

    Nice, all my friends must subscribe..Can we also use sharedpreferences to pass details between activities.

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

      Thanks, you should never use SharedPreferences for that, instead use intent extras

    • @tochukwuokey-munonye7884
      @tochukwuokey-munonye7884 4 года назад

      @@PhilippLackner what of when navigating from activity to fragment