<NME> MockWebViewImpl.java
<BEF> package io.cordova.reactnative.mocks;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.view.View;
import android.webkit.WebChromeClient;

import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.modules.core.DeviceEventManagerModule;

import org.apache.cordova.CordovaInterface;
import org.apache.cordova.CordovaPreferences;
import org.apache.cordova.CordovaResourceApi;
import org.apache.cordova.CordovaWebView;
import org.apache.cordova.CordovaWebViewEngine;
import org.apache.cordova.ICordovaCookieManager;
import org.apache.cordova.PluginEntry;
import org.apache.cordova.PluginManager;
import org.apache.cordova.PluginResult;

import java.util.List;
import java.util.Map;

public class WebViewMock implements CordovaWebView {

    public static final String TAG = "CordovaWebViewProxy";
    public static final String NOT_CORDOVA_ERR = "This is not a cordova app, so it does not implement the method asked for";

    private CordovaResourceApi resourceApi;
    private Activity activity;
    private ReactApplicationContext context;
    private PluginManager pluginManager;
    private CordovaPreferences preferences;

    public WebViewMock(ReactApplicationContext reactContext, Activity mainReactActivity) {
        this.context = reactContext;
        this.activity = mainReactActivity;
    }

    @Override
    public void init(CordovaInterface cordova, List<PluginEntry> pluginEntries, CordovaPreferences preferences) {
        this.preferences = preferences;
        this.pluginManager = new PluginManager(this, cordova, pluginEntries);
        this.pluginManager.init();

        this.resourceApi = new CordovaResourceApi(this.context, this.pluginManager);

    }

    @Override
    public boolean isInitialized() {
        return false;
    }

    @Override
    public View getView() {
        return null;
    }

    @Override
    public void loadUrlIntoView(String url, boolean recreatePlugins) {

    }

    @Override
    public void stopLoading() {

    }

    @Override
    public boolean canGoBack() {
        return false;
    }

    @Override
    public void clearCache() {

    }

    @Override
    public void clearCache(boolean b) {

    }

    @Override
    public void clearHistory() {

    }

    @Override
    public boolean backHistory() {
        return false;
    }

    @Override
    public void handlePause(boolean keepRunning) {

    }

    @Override
    public void onNewIntent(Intent intent) {

    }

    @Override
    public void handleResume(boolean keepRunning) {

    }

    @Override
    public void handleStart() {

    }

    @Override
    public void handleStop() {

    }

    @Override
    public void handleDestroy() {

    }

    @Override
    public void sendJavascript(String statememt) {

    }

    @Override
    public void showWebPage(String url, boolean openExternal, boolean clearHistory, Map<String, Object> params) {

    }

    @Override
    public boolean isCustomViewShowing() {
        return false;
        return false;
    }

    @Override
    public void showCustomView(View view, WebChromeClient.CustomViewCallback callback) {

    }

    @Override

    }

    @Override
    public CordovaResourceApi getResourceApi() {
        return this.resourceApi;
    }

    @Override
    public void setButtonPlumbedToJs(int keyCode, boolean override) {
    public void setButtonPlumbedToJs(int keyCode, boolean override) {

    }

    @Override
    public boolean isButtonPlumbedToJs(int keyCode) {
    }

    @Override
    public void sendPluginResult(PluginResult cr, String callbackId) {
        Log.d(TAG, String.format("Plugin result %s", cr));

        WritableMap params = Arguments.createMap();
        params.putString("message", cr.getMessage());
        params.putInt("status", cr.getStatus());
        params.putInt("messageType", cr.getMessageType());
        params.putString("callbackId", callbackId);

        this.context.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(TAG, params);
    }

    @Override
    @Override
    public PluginManager getPluginManager() {
    }

    @Override
    public CordovaWebViewEngine getEngine() {
        throw new RuntimeException(NOT_CORDOVA_ERR);
    }

    @Override
    public CordovaPreferences getPreferences() {
        return this.preferences;
    }

    @Override
    @Override
    public ICordovaCookieManager getCookieManager() {
        throw new RuntimeException(NOT_CORDOVA_ERR);
    }

    @Override
    public String getUrl() {
    }

    @Override
    public Context getContext() {
        return this.context;
    }

    @Override
    @Override
        throw new RuntimeException(NOT_CORDOVA_ERR);
    }

    @Override
    public Object postMessage(String id, Object data) {
        return null;
    }
}
}

<MSG> Handing callbacks from plugins that start another activity

<DFF> @@ -1,6 +1,5 @@
-package io.cordova.reactnative.mocks;
+package io.cordova.reactnative;
 
-import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
 import android.util.Log;
@@ -25,20 +24,21 @@ import org.apache.cordova.PluginResult;
 import java.util.List;
 import java.util.Map;
 
-public class WebViewMock implements CordovaWebView {
+public class MockWebViewImpl implements CordovaWebView {
+
+    public static final String JS_MESSAGE_CORDOVA_WEBVIEW_PROXY = "CordovaWebViewProxy";
+    private static final String JS_MESSAGE_CORDOVA_EVENT = "CordovaWebViewJSEvent";
 
-    public static final String TAG = "CordovaWebViewProxy";
     public static final String NOT_CORDOVA_ERR = "This is not a cordova app, so it does not implement the method asked for";
 
     private CordovaResourceApi resourceApi;
-    private Activity activity;
     private ReactApplicationContext context;
     private PluginManager pluginManager;
     private CordovaPreferences preferences;
+    private boolean hasPausedEver;
 
-    public WebViewMock(ReactApplicationContext reactContext, Activity mainReactActivity) {
+    public MockWebViewImpl(ReactApplicationContext reactContext) {
         this.context = reactContext;
-        this.activity = mainReactActivity;
     }
 
     @Override
@@ -46,96 +46,117 @@ public class WebViewMock implements CordovaWebView {
         this.preferences = preferences;
         this.pluginManager = new PluginManager(this, cordova, pluginEntries);
         this.pluginManager.init();
-
         this.resourceApi = new CordovaResourceApi(this.context, this.pluginManager);
-
     }
 
     @Override
-    public boolean isInitialized() {
-        return false;
+    public void sendPluginResult(PluginResult cr, String callbackId) {
+        WritableMap params = Arguments.createMap();
+        params.putString("message", cr.getMessage());
+        params.putInt("status", cr.getStatus());
+        params.putInt("messageType", cr.getMessageType());
+        params.putString("callbackId", callbackId);
+        this.context.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(JS_MESSAGE_CORDOVA_WEBVIEW_PROXY, params);
     }
 
     @Override
-    public View getView() {
-        return null;
+    public void sendJavascript(String statememt) {
+        this.context.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(JS_MESSAGE_CORDOVA_EVENT, statememt);
     }
 
     @Override
-    public void loadUrlIntoView(String url, boolean recreatePlugins) {
+    public void handlePause(boolean keepRunning) {
+        hasPausedEver = true;
+        pluginManager.onPause(keepRunning);
+    }
 
+    @Override
+    public void onNewIntent(Intent intent) {
+        if (this.pluginManager != null) {
+            this.pluginManager.onNewIntent(intent);
+        }
     }
 
     @Override
-    public void stopLoading() {
+    public void handleResume(boolean keepRunning) {
+        this.pluginManager.onResume(keepRunning);
+        // To be the same as other platforms, fire this event only when resumed after a "pause".
+        if (hasPausedEver) {
+            sendJavascriptEvent("resume");
+        }
+    }
 
+    private void sendJavascriptEvent(String event) {
+        this.sendJavascript("console.log(" + event + ")");
     }
 
     @Override
-    public boolean canGoBack() {
-        return false;
+    public void handleStart() {
+        pluginManager.onStart();
     }
 
     @Override
-    public void clearCache() {
-
+    public void handleStop() {
+        pluginManager.onStop();
     }
 
     @Override
-    public void clearCache(boolean b) {
-
+    public void handleDestroy() {
+        this.pluginManager.onDestroy();
     }
 
     @Override
-    public void clearHistory() {
+    public void showWebPage(String url, boolean openExternal, boolean clearHistory, Map<String, Object> params) {
 
     }
 
     @Override
-    public boolean backHistory() {
-        return false;
+    public Object postMessage(String id, Object data) {
+        return pluginManager.postMessage(id, data);
     }
 
     @Override
-    public void handlePause(boolean keepRunning) {
-
+    public boolean isInitialized() {
+        return true;
     }
 
     @Override
-    public void onNewIntent(Intent intent) {
-
+    public View getView() {
+        return null;
     }
 
     @Override
-    public void handleResume(boolean keepRunning) {
-
+    public void loadUrlIntoView(String url, boolean recreatePlugins) {
+        // NOT IMPLEMENTED
     }
 
     @Override
-    public void handleStart() {
-
+    public void stopLoading() {
     }
 
     @Override
-    public void handleStop() {
-
+    public boolean canGoBack() {
+        return false;
     }
 
     @Override
-    public void handleDestroy() {
-
+    public void clearCache() {
     }
 
     @Override
-    public void sendJavascript(String statememt) {
-
+    public void clearCache(boolean b) {
     }
 
     @Override
-    public void showWebPage(String url, boolean openExternal, boolean clearHistory, Map<String, Object> params) {
+    public void clearHistory() {
+    }
 
+    @Override
+    public boolean backHistory() {
+        return false;
     }
 
+
     @Override
     public boolean isCustomViewShowing() {
         return false;
@@ -151,10 +172,6 @@ public class WebViewMock implements CordovaWebView {
 
     }
 
-    @Override
-    public CordovaResourceApi getResourceApi() {
-        return this.resourceApi;
-    }
 
     @Override
     public void setButtonPlumbedToJs(int keyCode, boolean override) {
@@ -167,16 +184,8 @@ public class WebViewMock implements CordovaWebView {
     }
 
     @Override
-    public void sendPluginResult(PluginResult cr, String callbackId) {
-        Log.d(TAG, String.format("Plugin result %s", cr));
-
-        WritableMap params = Arguments.createMap();
-        params.putString("message", cr.getMessage());
-        params.putInt("status", cr.getStatus());
-        params.putInt("messageType", cr.getMessageType());
-        params.putString("callbackId", callbackId);
-
-        this.context.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(TAG, params);
+    public CordovaResourceApi getResourceApi() {
+        return this.resourceApi;
     }
 
     @Override
@@ -185,13 +194,13 @@ public class WebViewMock implements CordovaWebView {
     }
 
     @Override
-    public CordovaWebViewEngine getEngine() {
-        throw new RuntimeException(NOT_CORDOVA_ERR);
+    public CordovaPreferences getPreferences() {
+        return this.preferences;
     }
 
     @Override
-    public CordovaPreferences getPreferences() {
-        return this.preferences;
+    public Context getContext() {
+        return this.context;
     }
 
     @Override
@@ -205,8 +214,8 @@ public class WebViewMock implements CordovaWebView {
     }
 
     @Override
-    public Context getContext() {
-        return this.context;
+    public CordovaWebViewEngine getEngine() {
+        throw new RuntimeException(NOT_CORDOVA_ERR);
     }
 
     @Override
@@ -214,8 +223,4 @@ public class WebViewMock implements CordovaWebView {
         throw new RuntimeException(NOT_CORDOVA_ERR);
     }
 
-    @Override
-    public Object postMessage(String id, Object data) {
-        return null;
-    }
 }

Handing callbacks from plugins that start another activity