Skip to content

PictureSelector 3.0 如何访问沙盒外资源?

Luck edited this page Apr 5, 2022 · 1 revision
.setSandboxFileEngine(new UriToFileTransformEngine() {
        @Override
        public void onUriToFileAsyncTransform(Context context, String srcPath, String mineType, OnKeyValueResultCallbackListener call) {
            if (call != null) {
                String sandboxPath = SandboxTransformUtils.copyPathToSandbox(context, srcPath, mineType)
                call.onCallback(srcPath,sandboxPath);
            }
          }
    });