SharePlugin::onShareState fail, error:android.os.FileUriExposedException: file:///data/user/0/com.xxxx/files/capture.png exposed beyond app through ClipData.Item.getUri()

When android share twitter with sdkbox PluginShare:

sdkbox::SocialShareInfo;
info.image=filePath.c_str();
info.showDialog=true;
info.platform=sdkbox::SocialPlatform::Platform_Twitter;
sdkbox::PluginShare::share(info);

I got SocialShareStateFail: error:android.os.FileUriExposedException: file:///data/user/0/com.xxxx/files/capture.png exposed beyond app through ClipData.Item.getUri()

With targetSdkVersion >= 24 should eplace “file://” URI with “content://” URI:
So how can solve this.

Thanks

we will fix this ASAP.

for temporarily, you can add following in Application.onCreate

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
    StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
    StrictMode.setVmPolicy(builder.build());
}