Send Data Back from Child Activity with startActivityForResult – Android Studio Tutorial
When we open another activity, we can send data to it by using an intent and putExtra. But what if we also want to get something back? This is what the startActivityForResult method is for. By opening our child activity with this method and overriding onActivityResult we can send data back to our parent activity after we set it with setResult in our child activity before we close it.
Source code:
https://gist.github.com/codinginflow/47ea5ce3628e8f6ec4eac57da523f7bf
____________________
💻 Find the BEST programming tutorials on TutHub:
https://tuthub.io
⭐ Get my MVVM Caching Course now:
https://codinginflow.com/caching
❗ Subscribe to the channel:
https://www.youtube.com/c/codinginflo…
📨 Subscribe to the Coding in Flow newsletter:
https://codinginflow.com/newsletter
❓ Join our free developer community:
https://discord.gg/TSnMvmc
📣 Follow Coding in Flow on other sites:
Facebook: https://www.facebook.com/codinginflow
Instagram: https://www.instagram.com/codinginflow
TikTok: https://www.tiktok.com/@codinginflow
Twitter: https://twitter.com/codinginflow
Github: https://github.com/codinginflow
💰 Business requests, sponsoring, etc.: info@codinginflow.com
Views :114542
android studio