title: Toast from destroyed activity/fragment, getString issue
body: <p>I have a fragment with UI that is responsible for doing short async api-calls. When an async task completes fragment triggers a Toast message with a result-string.</p>
  
  <p>My issue is that if a user presses Back button without waiting for the result the app crushes due to a <code>onPostExecute</code> method, which in turn triggers <code>Toast</code> + <code>getString(R.string.whatever)</code> in the fragment that is already detached, because the activity is behind the <code>onDestroy</code> state.</p>
  
  <p>I can check whether the fragment is detached or use a <code>ProgressDialog</code>, which is modal but I think it would be nice to show the toasts without blocking or any other quirks. Any suggestions on how to achieve it? Broadcast receiver in the application class == overkill?</p>
  
  <p>Thanks.</p>
  
  <p><strong>UPD</strong> logs:</p>
  
  <blockquote>
    <p>01-24 12:01:29.626: E/AndroidRuntime(616):
    java.lang.IllegalStateException: Fragment
    HandsetSocialNetworksFragment{40612a78} not attached to Activity 01-24
    12:01:29.626: E/AndroidRuntime(616):  at
    android.support.v4.app.Fragment.getResources(Fragment.java:571) 01-24
    12:01:29.626: E/AndroidRuntime(616):  at
    android.support.v4.app.Fragment.getString(Fragment.java:593)</p>
  </blockquote>