From 5092b2931215f574811930062bec2eaf26f56c64 Mon Sep 17 00:00:00 2001 From: Takeshi Sone Date: Thu, 21 Feb 2013 02:10:10 +0900 Subject: [PATCH] [CB-2518] Enable Geolocation in InAppBrowser --- framework/src/org/apache/cordova/InAppBrowser.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/framework/src/org/apache/cordova/InAppBrowser.java b/framework/src/org/apache/cordova/InAppBrowser.java index ffcc6499..ad8ddaad 100644 --- a/framework/src/org/apache/cordova/InAppBrowser.java +++ b/framework/src/org/apache/cordova/InAppBrowser.java @@ -50,6 +50,7 @@ import android.view.WindowManager.LayoutParams; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodManager; import android.webkit.WebChromeClient; +import android.webkit.GeolocationPermissions.Callback; import android.webkit.WebSettings; import android.webkit.WebStorage; import android.webkit.WebView; @@ -524,6 +525,18 @@ public class InAppBrowser extends CordovaPlugin { quotaUpdater.updateQuota(currentQuota); } } + + /** + * Instructs the client to show a prompt to ask the user to set the Geolocation permission state for the specified origin. + * + * @param origin + * @param callback + */ + @Override + public void onGeolocationPermissionsShowPrompt(String origin, Callback callback) { + super.onGeolocationPermissionsShowPrompt(origin, callback); + callback.invoke(origin, true, false); + } } /**