Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 56723DA0E for ; Mon, 23 Jul 2012 23:07:35 +0000 (UTC) Received: (qmail 36412 invoked by uid 500); 23 Jul 2012 23:07:35 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 36393 invoked by uid 500); 23 Jul 2012 23:07:35 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 36371 invoked by uid 99); 23 Jul 2012 23:07:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jul 2012 23:07:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 0276A140CCD for ; Mon, 23 Jul 2012 23:07:35 +0000 (UTC) Date: Mon, 23 Jul 2012 23:07:35 +0000 (UTC) From: "Joe Bowser (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1018766977.93280.1343084855012.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1807294189.50496.1340619764148.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Resolved] (CB-955) CordovaWebViewClient shouldOverrideUrlLoading method not called upon a redirect MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joe Bowser resolved CB-955. --------------------------- Resolution: Cannot Reproduce I can't reproduce this on 2.0, closing > CordovaWebViewClient shouldOverrideUrlLoading method not called upon a redirect > ------------------------------------------------------------------------------- > > Key: CB-955 > URL: https://issues.apache.org/jira/browse/CB-955 > Project: Apache Cordova > Issue Type: Bug > Components: Android > Affects Versions: 1.8.1 > Environment: - Android 4.0 emulator running in windows machine as well in iOS machine > - Android 2.3 device. > Reporter: Vaduganathan > Assignee: Joe Bowser > Fix For: 2.1.0 > > > Summary > ------- > in Cordova v 1.8.1 a DroidGap.appview's CordovaWebViewClient.shouldOverrideUrlLoading method is not called when that appview loads a URL that results in a redirect. > To reproduce > ------------ > - create a DroidGap activity and set instance of CordovaWebViewClient as DroidGap.appview's WebViewClient. > - override shouldOverrideUrlLoading > - have the DroidGap.appview load a URL that redirects to another page > Sample code (from within an Activity subclass): > public class HelloPhoneGapActivity extends DroidGap { > /** Called when the activity is first created. */ > @Override > public void onCreate(Bundle savedInstanceState) { > try{ > super.onCreate(savedInstanceState); > super.init(); > super.appView.clearCache(true); > super.appView.clearHistory(); > this.appView.setWebViewClient(new CordovaWebViewClient(this){ > public boolean shouldOverrideUrlLoading(final WebView view, String url) { > Log.i("BugTest", "shouldOverrideUrlLoading: " + url); > return true; > } > public void onPageStarted(WebView view, String url, Bitmap favicon) { > Log.i("BugTest", "onPageStarted: " + url); > } > public void onPageFinished(WebView view, String url) { > Log.i("BugTest", "onPageFinished: " + url); > } > }); > super.loadUrl(("http://google.com"); > Actual behavior > --------------- > The following is logged: > INFO/BugTest(14658): onPageStarted: http://google.com/ > INFO/BugTest(14658): onPageStarted: http://www.google.com/ > INFO/BugTest(14658): onPageFinished: http://www.google.com/ > Expected Behavior > ----------------- > On devices running with cordova 1.8.1 (Android OS version 4.0), the following is logged: > INFO/BugTest(11447): onPageStarted: http://google.com/ > INFO/BugTest(11447): onPageStarted: http://www.google.com/ > INFO/BugTest(11447): shouldOverrideUrlLoading: http://www.google.com/ > INFO/BugTest(11447): onPageFinished: http://www.google.com/ -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira