cordova-plugin-crypt-file icon indicating copy to clipboard operation
cordova-plugin-crypt-file copied to clipboard

it's not working on cordova-android 10.0.0 and above

Open kokchyuan opened this issue 4 years ago • 6 comments

kokchyuan avatar Oct 14 '21 02:10 kokchyuan

I maybe have the same issue. I am using ionic with capacitor. After installing the plug-in the sources files do not get encrypted.

"@ionic-native/core": "^5.36.0", "@capacitor/app": "^1.0.5", "@capacitor/core": "^3.2.5",

CoooWeee avatar Oct 23 '21 01:10 CoooWeee

i can't make it work either, any updates?

LongTimeNoTea avatar Nov 16 '21 19:11 LongTimeNoTea

Same, on android 10 its not working.

serfermorhc avatar Jan 18 '22 11:01 serfermorhc

Can't think any way to make this plugin work on cordova android 10, the hacky way i can think of is to replace the platforms/android/CordovaLib/src/org/apache/cordova/engine folder from cordova android 9.1.0, this will fallback the usage of WebViewAssetLoader and the plugin will able to work. If you guys have any other solution please comment. Thanks

kokchyuan avatar Jan 19 '22 03:01 kokchyuan

i try replace this code

platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewClient.java

    @Override
    public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
        // return this.assetLoader.shouldInterceptRequest(request.getUrl());
        return super.shouldInterceptRequest(view, request);
    }

iPMisterX avatar Jan 27 '22 06:01 iPMisterX

#100 Added Cordova Path Handler web plugin to decrypt web requests. If fall-through to file protocol the original should still work. It does require AndroidX so if you are having android-x support issues due to various versions, especially on 9 template, adding cordova-plugin-androidx-adapter should fix that.

weareu avatar Feb 02 '22 06:02 weareu