title: Change state when back to app
body: <p>For example, I have one activity that contains one edittext and button.I write something on it then click button.And button goes to another app this is my code</p>
  
  <pre><code>    Intent intent = new Intent();
      intent.setAction(Intent.ACTION_SEND);
  
      intent.setType("text/plain");
      intent.putExtra(Intent.EXTRA_TEXT, message.getText().toString());
      startActivity(Intent.createChooser(intent, "Share"));
  </code></pre>
  
  <p>Then after sharing, how can I make to go to another activity(or fragment) when I back to my app.</p>