Github user agrieve commented on a diff in the pull request:
https://github.com/apache/cordova-android/pull/132#discussion_r19540361
--- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
@@ -162,19 +162,53 @@ public Object onMessage(String id, Object data) {
* Called when an activity you launched exits, giving you the
requestCode you started it with,
* the resultCode it returned, and any additional data from it.
*
- * @param requestCode The request code originally supplied to
startActivityForResult(),
- * allowing you to
identify who this result came from.
- * @param resultCode The integer result code returned by the
child activity through its setResult().
- * @param intent An Intent, which can
return result data to the caller (various data can be attached to Intent
"extras").
+ * @param requestCode The request code originally supplied to
startActivityForResult(),
+ * allowing you to identify who this result came
from.
+ * @param resultCode The integer result code returned by the child
activity through its setResult().
+ * @param intent An Intent, which can return result data to the
caller (various data can be
+ * attached to Intent "extras").
*/
public void onActivityResult(int requestCode, int resultCode, Intent
intent) {
}
/**
+ * Hook for blocking the loading of external resources.
+ *
+ * This will be called when the WebView's shouldInterceptRequest wants
to know whether to
+ * open a connection to an external resource. Return false to block
the request. Only if
+ * all plugins return true, then the request will proceed.
+ */
+ public Boolean shouldAllowRequest(String url) {
+ return true;
+ }
+
+ /**
+ * Hook for blocking navigation by the Cordova WebView
+ *
+ * This will be called when the WebView's needs to know whether to
navigate to a new page.
+ * Return false to block the navigation. Only if all plugins return
true, then the navigation
+ * will proceed.
+ */
+ public Boolean shouldAllowNavigation(String url) {
+ return null;
+ }
+
+ /**
+ * Hook for blocking the launching of Intents by the Cordova
application
+ *
+ * This will be called when the WebView will not navigate to a page,
but could launch an intent
+ * to handle the URL. Return false to block the navigation. Only if
all plugins return true,
--- End diff --
Don't think this description is right - plugins can return null and not
effect it right?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]