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 8C41B17D39 for ; Mon, 9 Mar 2015 16:04:18 +0000 (UTC) Received: (qmail 59284 invoked by uid 500); 9 Mar 2015 16:04:18 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 59240 invoked by uid 500); 9 Mar 2015 16:04:18 -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 59226 invoked by uid 99); 9 Mar 2015 16:04:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2015 16:04:17 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of agrieve@google.com designates 209.85.213.174 as permitted sender) Received: from [209.85.213.174] (HELO mail-ig0-f174.google.com) (209.85.213.174) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2015 16:04:12 +0000 Received: by igbhn18 with SMTP id hn18so22530762igb.2 for ; Mon, 09 Mar 2015 09:03:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=6vyNPx4liS63J8tz8JqoeAICbBhdVPXydMQBpUYDR50=; b=Ddi7Pp5bGY6ipRCojkL0BFC0ydeCpF1vAbdOjqTZc/pQcziBdfzgF6V84WSUen1GnD txCZk3WqaUXATvZUtSBawNpMQgUYtmvgdh3PPFMpEsBCMIoyXVVXYiEbDBE2EZ3Cf00Q IfUZebsbWvjMEf+vYvoMRSVet1fz+ABK+uXcIkuJQC9cZn9qweqD1ESITjJUVKQeL9X9 5F9U5EGd1Xn4lK4wMzmlP6hDhBnUmSUoM4jDBjJyv0LXR41RRQAK/ZprdKrsTSocXkG/ HqEaaDU+M0CvHH3xR6lC8o7DX6jvjzRBV/65djjE/ZofZIDdz9/jhFJH/1MyyvocWOoT CYdw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=6vyNPx4liS63J8tz8JqoeAICbBhdVPXydMQBpUYDR50=; b=Bo9NhSDeXYF8rrsW5u//T8viIyOqTBVx9MViKDvwEzr5dKmUesp4SwpKIJPtj1M6J1 K733jvtIeJbSLlVcTuSN3rX2eLhy4fCYFzW81LBKEnB3Ll4+jr/saEa7zqJlddnXYJ55 ektVVSqVLz/qC5hpJWloGI8LyK990Cy3cTNK0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-type; bh=6vyNPx4liS63J8tz8JqoeAICbBhdVPXydMQBpUYDR50=; b=Mf6jlCA+rp6tykphGx9nMD5n054DpuGdJK8VWDgoCyzsm7RU5qDIvlcKeHf1D7y3pj yD9H58Uj1YRUASoHBHePV9yuBzjynhuF2VcoI7hibPBnyngD/NeTnzCkCJmxegyflypM df3NmSQcctn2hg3OJ5hyl5OtwScXHGbXYWDVlNLmXpVtdace+8j65XVB7+1vxxXVqa/R js5y4/h8E1YTUpTn/3/5aZVjz8wivYQ8M5zzRGnw8eF73dqGYyXul6YGcTg2uwN/zwUx 0PkQXBh1URQXJpA0NeEA19pjhR/sKH2zzbWLplqjVKm0PUVKHEa9z6QiheoM2RL3Klzn +VkQ== X-Gm-Message-State: ALoCoQlmcSPKSaorTcHzbGacKZwFI2m6vsXL1laCaZN3OnNIeezUnYj1tjKmVqvcM4szLFuV5ZZF X-Received: by 10.50.29.68 with SMTP id i4mr49639084igh.4.1425917031873; Mon, 09 Mar 2015 09:03:51 -0700 (PDT) MIME-Version: 1.0 Sender: agrieve@google.com Received: by 10.36.3.14 with HTTP; Mon, 9 Mar 2015 09:03:31 -0700 (PDT) In-Reply-To: References: From: Andrew Grieve Date: Mon, 9 Mar 2015 12:03:31 -0400 X-Google-Sender-Auth: i_W-BeoGSe7UVy1Mba2uMCNysAM Message-ID: Subject: Re: Deprecation of Config and the embedded use case (4.0.x related) To: dev Content-Type: multipart/alternative; boundary=047d7bd758462a28ac0510dd2e67 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bd758462a28ac0510dd2e67 Content-Type: text/plain; charset=UTF-8 On Mon, Mar 9, 2015 at 11:56 AM, Joe Bowser wrote: > On Mon, Mar 9, 2015 at 7:39 AM Andrew Grieve wrote: > > > You can now instantiate a CordovaWebView without a config.xml, and > without > > using Config. This happened when I added an "init()" method to > > CordovaWebView. You can pass in a CordovaPreferences object, and a list > of > > PluginEntry. Maybe we just need a better comment on Config saying to use > > these instead? > > > > > Where does one get this PluginEntry list when they're embedding a WebView? > This needs to be documented or at least put in the test that tests this use > case. > > > > > > > That has nothing to do with InAppBrowser, this is to do with embedding > a > > > WebView inside an Android application. I don't think you understand > what > > I > > > mean when I say the embedded use case. > > > > > Maybe try explaining a bit more? > > > Even though you edited the test that explicitly covers this use, case, and > even though we've talked about using CordovaWebView as an Android View for > over a year, you need it explained more? > > So, not everyone wants to use all of Cordova, for many reasons. Instead, > they really just want to take advantage of the WebView component in their > native apps so that they can create hybrid apps that are mostly native with > only some parts that use Cordova. This is where you would declare your > view in your layout XML like this: > > android:id="@+id/WebViewComponent" > android:layout_width="match_parent" > android:layout_height="match_parent"> > > > And then, in the activity start up your view like this: > > private CordovaWebView webInterface; > private CordovaInterfaceImpl systemInterface = new > CordovaInterfaceImpl(this); > > //Set up the webview > SystemWebView webView = (SystemWebView) > findViewById(R.id.WebViewComponent); > webInterface = new CordovaWebViewImpl(this, new > SystemWebViewEngine(webView)); > > Config.init(); > webInterface.init(systemInterface, Config.getPluginEntries(), > Config.getPreferences()); > webView.loadUrl(Config.getStartUrl()); > > Right now, we're getting the configuration from the Config class, because > we at least have access to this. If we don't have this, how do people get > access to the list of plugin entries specified in Config.xml? I'm pretty > sure we still want to support this feature. > > Does that make sense? > I gotcha. So, I think the answer is to use ConfigXmlParser() to extract the information required by init. You shouldn't need the call Config.init() at all. --047d7bd758462a28ac0510dd2e67--