Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-5059

The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager

    XMLWordPrintableJSON

Details

    Description

      The android implementation of file transfer plugin leverages the class android.webkit.CookieManager, which depends on the concrete web infrastructure android.webkit.WebView. This dependence ruins the portability of the plugin. For example, it could not run on a substantial implementation of CordovaWebView which based on a android third party component(such as chromium for android).

      Following is the crash log when initializing the CookieManager without android.webkit.WebView:
      I/dalvikvm(5006): java.lang.IllegalStateException: Call CookieSyncManager::createInstance() or create a webview before using this class
      I/dalvikvm(5006): at android.webkit.JniUtil.checkInitialized(JniUtil.java:44)
      I/dalvikvm(5006): at android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65)
      I/dalvikvm(5006): at android.webkit.CookieManagerClassic.nativeGetCookie(Native Method)
      I/dalvikvm(5006): at android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109)
      I/dalvikvm(5006): at android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96)
      I/dalvikvm(5006): at org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747)

      Attachments

        Activity

          People

            Unassigned Unassigned
            Junmin Junmin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: