0

I want to send the user from application 1 to application 2 by pressing a button. In application 2, the user performs an action (for example, writes text), then he clicks the button and the text is sent to application 1.

I know that there is a certain "Getting a result from an activity", but I could not figure out how it works. I also found examples on YouTube where similar actions are performed, but inside one application. How can this be done using different applications?

Nikita
  • 1

1 Answers1

0

You can launch an Activity using startActivityForResult(). The Activity that you launch does not necessarily need to be in the same application. When that Activity calls setResult() and then finish(), the information that was passed in setResult() will be returned to your original Activity in the method onActivityResult().

I'm sure that you can find some tutorials about how to use startActivityForResult().

David Wasser
  • 93,459
  • 16
  • 209
  • 274