我的应用被拒绝了,原因是您的应用使用的内容提供程序具有不安全的openfile实现。
@Override
public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
File privateFile = new File(uri.getPath());
ParcelFileDescriptor desc = ParcelFileDescriptor.open(privateFile, ParcelFileDescriptor.MODE_READ_ONLY);
return desc;
}
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true"
tools:replace="android:authorities">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_provider_paths"
tools:replace="android:resource" />
</provider>
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="external_files" path="."/>
<external-path name="image_path" path="file:///sdcard/temporary_file.jpg"/>
</paths>
<!--<external-path name="image_path" path="file:///storage/emulated/0/Infogainify/Default"/>-->