title: How to get current displayed activity from static ASyncTask?
body: <p>I'm currently having a hard time with a static ASyncTask reporting its result via a snackbar message.</p>
  
  <p>Here's the top of the ASyntask:</p>
  
  <pre><code>private static class PushSettingsToDevice extends AsyncTask&lt;URL, Void, Boolean&gt; {
      private View rootView;
      private PushSettingsToDevice(View rootView){this.rootView = rootView;}
  </code></pre>
  
  <p>And here's the end:</p>
  
  <pre><code>@Override
      protected void onPostExecute(Boolean result) {
          try{
              Log.d(TAG, "pushSettings Finished.");
              Snackbar.make(rootView, MyApplication.getContext().getResources().getString(R.string.app_schedule_menu_settings_applied), Snackbar.LENGTH_LONG).show();
          } catch(Exception e){
              e.printStackTrace();
          }
  </code></pre>
  
  <p>To display the snackBar, I need a reference to a View (rootView in my exemple), but by doing so, I reference a view from a static class, and create a memory leak.</p>
  
  <p>How can I display the snackBar on any view the user is currently seeing? In other words, how can I retrieve from my static ASyncTask the Activity currently displayed to the user, and then a view within this Activity?</p>