On Fri, Mar 6, 2015 at 6:50 PM, Joe Bowser <bows...@gmail.com> wrote:
> The issue is that it's a public API that is used by anyone who is looking > to embed a webview. This can be found in the test that you re-wrote. > Right now, there's no way for people who want to embed a CordovaWebView in > their app to do so without the Config class. Having a public API marked as > deprecated without a solid alternative is a really bad idea, and we should > figure out how we want users to be able to embed Cordova in their existing > Android applications. > 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? > > 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? > > > > > On Fri, Mar 6, 2015 at 10:48 AM Andrew Grieve <agri...@chromium.org> > wrote: > > > Where do you see it being used? > > Within cordova-android, we are setting it, but I don't the we ever read > > from it. > > Within plugins: > > $ grep -r Config *plugin*/src/android > > cordova-plugin-file-transfer/src/android/FileTransfer.java:import > > org.apache.cordova.Config; > > cordova-plugin-inappbrowser/src/android/InAppBrowser.java:import > > org.apache.cordova.Config; > > cordova-plugin-inappbrowser/src/android/InAppBrowser.java: > > * Previously the Config class had a static method, > > isUrlWhitelisted(). That > > cordova-plugin-inappbrowser/src/android/InAppBrowser.java: > > Method iuw = Config.class.getMethod("isUrlWhiteListed", > > String.class); > > > > We could remove the unused import, and change IAB to use reflection. > > > > On Fri, Mar 6, 2015 at 1:06 PM, Joe Bowser <bows...@gmail.com> wrote: > > > > > Hey > > > > > > I've been trying to figure out how you would embed a WebView with the > > > changes that we made to Cordova for 4.0.x, and I noticed that we're > still > > > making heavy use of the Config class, even though we have it set up to > be > > > deprecated. > > > > > > Are we still intending to deprecate this class, and if so, what do we > use > > > for this use case for loading the plugins? This is important for people > > who > > > want to use Cordova as a component, and want to create a more-hybrid > app > > > and not just a wrapper. > > > > > > Thoughts? > > > > > > Joe > > > > > >