例子:下载apk然后安装
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.wj.autocoffeem.fileProvider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
//provider_paths
<?xml version="1.0" encoding="utf-8"?>
<resources>
<paths>
<!--360-->
<!--<root-path path="" name="camera_photos" />-->
<!--与`${RNFS.ExternalStorageDirectoryPath}/NewApp.apk`这个路劲匹配的-->
<files-path path="" name="camera_photos" />
<!--与`${RNFS.DocumentDirectoryPath}/NewApp.apk`这个路劲匹配的-->
</paths>
</resources>
下载路劲:const downloadDestPath = `${RNFS.DocumentDirectoryPath}/NewApp.apk`;