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 522E1C1ED for ; Fri, 18 May 2012 12:39:50 +0000 (UTC) Received: (qmail 80626 invoked by uid 500); 18 May 2012 12:39:50 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 80600 invoked by uid 500); 18 May 2012 12:39:50 -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 80590 invoked by uid 99); 18 May 2012 12:39:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2012 12:39:50 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of simon.macdonald@gmail.com designates 209.85.210.47 as permitted sender) Received: from [209.85.210.47] (HELO mail-pz0-f47.google.com) (209.85.210.47) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 May 2012 12:39:44 +0000 Received: by dalh21 with SMTP id h21so3372569dal.6 for ; Fri, 18 May 2012 05:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=mQFsXLbWZ0XTJeX2fpfikRb62dRjEKs/wigOJp58Zeo=; b=znaxLiJep10CymFj7fyvnbuLgyeDsIi+SOieLWywSWl+HMdgE/+92vfNNPV9aXO1kE Oouaiqd+Cf489jS+pwj2drHG8wn1OdWrson+Qn9JWku5lcBEbE8SEbdZgtepYF5VPdcp OlhHUfyha8bBPHMN5PFV8TlueRbh3WdDzXdC/3pcWA8ndYJBf+ZpukOUUUsRW6oN7vRH hwT1cmdCHZmaIkIRrY1QogZh8EWWxnq610QxuJMjvlZyv70/l2hkRxG0/vtJhIIlQD0Z MAQsMTZ/O8J8SsWt8HPbNWGRTLEzxm8IRCjizbXYQTlQw+TVu9OJjlDfZ3qXPk+yDSFE kIkQ== Received: by 10.68.203.98 with SMTP id kp2mr38572884pbc.19.1337344762790; Fri, 18 May 2012 05:39:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.36.225 with HTTP; Fri, 18 May 2012 05:39:02 -0700 (PDT) In-Reply-To: References: From: Simon MacDonald Date: Fri, 18 May 2012 08:39:02 -0400 Message-ID: Subject: Re: API function: Open url in system web browser To: callback-dev@incubator.apache.org, alunny@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Maybe it's time to pull the ChildBrowser into the core Cordova API? It is currently available on Android/BB/iOS (not sure about WP7). This seems like the logical place to put any new API. Specifically on Android the ChildBrowser gives you two main methods: showWebPage - communicates with your main app by sending location change events. openExternal - Fires up the native Android browser Simon Mac Donald http://hi.im/simonmacdonald On Thu, May 17, 2012 at 6:12 PM, Andrew Lunny wrote: > Why would a new API be overkill for something tons of apps and users > need? Here are some representative threads from PG Build about users > wanting this kind of API: > > http://community.phonegap.com/nitobi/topics/external_links_outside_webview > http://community.phonegap.com/nitobi/topics/iframes_open_in_safari_in_ios > http://community.phonegap.com/nitobi/topics/why_app_opens_in_external_widow > http://community.phonegap.com/nitobi/topics/opening_native_browser_programmatically_with_phonegap_build > http://community.phonegap.com/nitobi/topics/js_opening_links_methods_and_config_xml_access_tag > > I realize a few of those were started by the same user, but there are lots > of me-toos and responses. > > -1 on clobbering window.open. window.open takes 3 parameters, two of which > are invalid for this use case, and lacks a callback parameter (for example, > if the user is prompted with a choice of browsers on an Android device and > declines to open the link entirely). > > On 17 May 2012 14:27, Shazron wrote: > >> iOS doesn't differentiate what the target attribute value is (thus >> ambiguous in Objective-C what the intent is). >> >> Good idea - we could clobber window.open, sure - and we add the native >> bits to support this. >> >> On Thu, May 17, 2012 at 2:27 PM, Filip Maj wrote: >> > So target="_blank" is no good to use for this. >> > >> > A "new" API seems overkill for me. >> > >> > What about clobbering window.open ? >> > >> > On 5/17/12 2:19 PM, "Shazron" wrote: >> > >> >>Punted this too much, need all of your input on this. >> >> >> >>Summary: >> >>We need an API function on all platforms to always open a url in the >> >>system web browser, right now each platform does its own thing, and on >> >>iOS it is very wonky, relying on a something that is ambiguous >> >>(navigation type value) through the target attribute of an anchor tag. >> >>Basically, I agree with Andrew's proposal here: >> >> >> https://issues.apache.org/jira/browse/CB-362?focusedCommentId=13247777&pag >> >> >>e=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment >> >>-13247777 >> >> >> >> >> >>JIRA issue: >> >>https://issues.apache.org/jira/browse/CB-362 >> >> >> >>See the matrix in the PG Build blog post: >> >>https://build.phonegap.com/blog/access-tags >> > >>