For some user flows, you will only launch an Activity for the sole purpose of retrieving a result back from it.
This exercise introduced you to another way of creating user flows using registerFor ActivityResult. This can be very useful for carrying out a dedicated Task where you need a result before proceeding with the user’s flow through the app.
- You’ll be using the
registerForActivityResult(ActivityResultContracts.StartActivityForResult())
function to get a result back from the Activity you launch.