Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C6EC7D116 for ; Thu, 22 Nov 2012 19:51:11 +0000 (UTC) Received: (qmail 50704 invoked by uid 500); 22 Nov 2012 19:51:11 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 50676 invoked by uid 500); 22 Nov 2012 19:51:11 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 50666 invoked by uid 99); 22 Nov 2012 19:51:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2012 19:51:11 +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 bowserj@gmail.com designates 209.85.223.181 as permitted sender) Received: from [209.85.223.181] (HELO mail-ie0-f181.google.com) (209.85.223.181) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2012 19:51:05 +0000 Received: by mail-ie0-f181.google.com with SMTP id c11so7447353ieb.26 for ; Thu, 22 Nov 2012 11:50:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=PJommWtb61I8NKxvHaB4YjcoiD7hM75uLHQdyqziJcQ=; b=ycpw3x3a97fS942j6QsiwzJpUaymUz2mmG8XNn0J7oXPZYAWXz2PAbdb8WtkcrOP2f tv688ococnAkep8mxpM/kLIWhT6C93HJ3mW/S6z7j9iETbqTaC/4dpneOVpI1k8e5FR2 9fHPVJwsMrLMSAYhKPu8j9jFfJHBWZ99kDTs3DQVBSodJL5BCcrPRjXt0Ek/+Az2ihqL q4Kx7CTaQgTwUxyx0lv6rvlsMi1H2+zdDhSYteBIssWfJapPcsePpDXFHlMW7OG4YIct JPhNPFNoeeFdYKC+R1U1iXBpBU7C/DkIZ+Ny1nD/I/GTdd0kqMliYLYBG186q/aRhDxX IVog== MIME-Version: 1.0 Received: by 10.50.184.226 with SMTP id ex2mr1598893igc.6.1353613844998; Thu, 22 Nov 2012 11:50:44 -0800 (PST) Received: by 10.64.65.201 with HTTP; Thu, 22 Nov 2012 11:50:44 -0800 (PST) In-Reply-To: References: Date: Thu, 22 Nov 2012 11:50:44 -0800 Message-ID: Subject: Re: InAppBrowser api questions From: Joe Bowser To: dev Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Why do we have the Forward and Back buttons on the browser on Android when Chrome and the Default Browser only have a refresh button? How does this handle the hardware back button? I think we should do what the platform does, except that we don't need multi-tab browsing. On Thu, Nov 22, 2012 at 11:47 AM, Simon MacDonald wrote: > Should the implementation of the InAppBrowser on Android mimic the UI of > the iOS app or should it go it's own way? > > Currently the Android ChildBrowser has the buttons and location bar on the > top of the screen. Is there any UI pattern we should be following for this > type of in app browsing? > > Simon Mac Donald > http://hi.im/simonmacdonald > > > On Mon, Nov 19, 2012 at 6:24 PM, Shazron wrote: > >> I have a pull request for the JavaScript changes, can someone please >> review: https://github.com/apache/incubator-cordova-js/pull/43 >> >> I have committed my InAppBrowser changes to iOS: >> >> https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-ios.git;a=commit;h=26a6535c >> >> To test this on iOS right now: >> cordova.exec(null, null, "InAppBrowser", "open", ["http://google.com", >> "_blank", "location=yes"]); >> >> (don't forget to add InAppBrowser/CDVInAppBrowser to your Cordova.plist). >> >> Note that non-whitelisted URLs cannot be opened in the InAppBrowser yet >> because of http://issues.cordova.io/1695 which I am doing next. >> >> Once the js changes are in (at least on ios), you can do: >> var mywin = window.open("http://www.google.com", "_blank", >> "location=no"); >> mywin.close(); >> >> >> >> >> >> On Thu, Nov 15, 2012 at 3:58 PM, Shazron wrote: >> >> > I updated the spec: http://wiki.apache.org/cordova/InAppBrowser >> > However, I added the _blank option as well just to be explicit. >> > >> > >> > On Thu, Nov 15, 2012 at 1:58 AM, Shazron wrote: >> > >> >> >> >> I spent some time playing with how to do this. >> >>> 1 - Use referer header - Too many situations result in no header, so >> this >> >>> is out! >> >>> 2 - Use Cookies - if there were a way to have UIWebViews use separate >> >>> cookie jars, this might be feasible. Don't think that's possible. >> >>> 3 - Use User-Agent - this is already suggested in CB-1695. I also found >> >>> this: >> >>> >> >>> >> http://stackoverflow.com/questions/12180224/unique-tab-id-appended-to-user-agent-string-in-chrome-for-ios >> >>> , >> >>> which suggests that this is what Chrome for iOS uses to implement >> >>> incognito >> >>> mode. If they can make it work, then we should be able to as well! >> >>> >> >>> So, this is looking like it's non-trivial but not impossible! As long >> as >> >>> it's possible, let's implement it :) >> >>> >> >>> >> >> Looks like it may be possible in CB-1695 as you mentioned -- so we can >> >> finish InAppBrowser with this one failing case until it is implemented. >> I >> >> can look into this further once I finish the InAppBrowser integration. >> >> >> >> >> >>> I don't think the semantics of _parent and _blank really map well to >> what >> >>> we're doing. My vote is to create a new special value: _system, and >> only >> >>> this target kicks you out to the system browser. >> >>> >> >>> Also: on the wiki we have: >> >>> [F] window.open('http://random-url.com', '_blank'); // native browser >> >>> >> >>> It seems weird to me that the effect of _blank changes based on whether >> >>> the >> >>> URL is in the whitelist. I'd think this case would also open in the >> >>> InAppBrowser. >> >>> >> >>> >> >>> Summary of what I think: >> >>> _self or no target --> open in cordova webview if it's in the >> Whitelist, >> >>> InAppBrowser otherwise >> >>> _system --> open in system browser >> >>> anything else --> open in InAppBrowser >> >>> >> >>> Also, I like Simon's idea of using the options in window.open to >> specify >> >>> whether to show URL bar etc. :) >> >>> >> >> >> >> I agree, we need a new value "_system" as you suggested, as well as the >> >> other parts of the summary of your changes -- makes more sense, and if >> used >> >> in another context -- it will just work as expected. I can make the wiki >> >> changes unless others have more comments. >> >> >> >> We can definitely add the window options as well, for sure! >> >> >> >> >> > >>