title: How to call a public method of an Activity from another Android Activity
body: <p>I have an Android activity (Whatever.java) and I want to call into Whatever.java a protected void onDestroy method writen in my MainActivity.</p>
  
  <p>onDestroy method of MainActivity.java is :</p>
  
  <pre><code>/** The final call you receive before your activity is destroyed. */
      protected void onDestroy() {
          DebugLog.LOGD("ImageTargets::onDestroy");
          super.onDestroy();
  
          // Cancel potentially running tasks
          if (mInitQCARTask != null
                  &amp;&amp; mInitQCARTask.getStatus() != InitQCARTask.Status.FINISHED) {
              mInitQCARTask.cancel(true);
              mInitQCARTask = null;
          }
  
          if (mLoadTrackerTask != null
                  &amp;&amp; mLoadTrackerTask.getStatus() != LoadTrackerTask.Status.FINISHED) {
              mLoadTrackerTask.cancel(true);
              mLoadTrackerTask = null;
          }
  
          // Ensure that all asynchronous operations to initialize QCAR
          // and loading the tracker datasets do not overlap:
          synchronized (mShutdownLock) {
  
              // Do application deinitialization in native code:
              deinitApplicationNative();
  
              // Unload texture:
              mTextures.clear();
              mTextures = null;
  
              // Destroy the tracking data set:
              destroyTrackerData();
  
              // Deinit the tracker:
              deinitTracker();
  
              // Deinitialize QCAR SDK:
              QCAR.deinit();
          }
  
          System.gc();
      }
  </code></pre>
  
  <p>How can I do it please?
  Thank you very much</p>