wonday / react-native-pdf

A <Pdf /> component for react-native
MIT License
1.58k stars 540 forks source link

blank screen (android 11 and above) #851

Closed imhastie closed 1 month ago

imhastie commented 1 month ago

in my case, users can't pick file themselves. it should be automatically. so, i cannot use file picker or somthing like that. code: const source = {uri: 'file:///storage/emulated/0/Download/xxxxxx.pdf'}; <Pdf source={source} onLoadComplete={console.log('load completed!!')} onLoadProgress={console.log('loading ...')} onError={error => console.log(error)} page={1} style={styles.pdf} />

manifest contains the following: `

<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />`

and: android:requestLegacyExternalStorage="true"

thanks to people who have time to answer.

imhastie commented 1 month ago

ok so, i just do the following steps: https://stackoverflow.com/a/68924679/23599442 any idea how to do it automatically?

imhastie commented 1 month ago

so i used this library: https://www.npmjs.com/package/manage-external-storage problem solved.