@@ -0,0 +1,916 @@
+package com.flyingsoftgames.ondestroyplugin;%0A%0Aimport org.apache.cordova.CallbackContext;%0Aimport org.apache.cordova.CordovaPlugin;%0Aimport org.apache.cordova.PluginResult;%0A%0Aimport org.json.JSONArray;%0Aimport org.json.JSONException;%0A%0Aimport android.util.Log;%0A%0Apublic class OnDestroyPlugin extends CordovaPlugin %7B%0A %0A private CallbackContext onDestroyCallback = null;%0A private final String LOG_TAG = %22onPausePlugin%22;%0A %0A public boolean execute (String action, JSONArray inputs, CallbackContext callbackContext) throws JSONException %7B%0A  onPauseCallback = callbackContext;%0A  return true;%0A %7D%0A %0A @Override public void onPause () %7B%0A  if (onPauseCallback != null) onPauseCallback.sendPluginResult (pluginResultKeep());%0A  super.onPause ();%0A %7D;%0A %0A private PluginResult pluginResultKeep () %7B%0A  PluginResult pluginResult = new PluginResult (PluginResult.Status.OK);%0A  pluginResult.setKeepCallback (true);%0A  return pluginResult;%0A %7D%0A%7D%0A

Create OnPausePlugin.java