но я просто меняю androidmanifest.xml и не работает, я использую реакцию родной, то мне следует изменить свой код?
это мой androidmanifest.xml:
Код: Выделить всё
...
...
...
Код: Выделить всё
const importDB = useCallback(async () => {
try {
const response = await DocumentPicker.pick({
presentationStyle: 'fullScreen',
copyToCacheDirectory: true,
});
setFileResponse(response);
response.map((file, index) => (
ulr_import = file?.uri
));
FileSystem.copyFile(ulr_import, `/data/user/0/com.app/databases/database.db` )
.then((success) => {
console.log('file moved!'+success);
Alert.alert('Confirmation', 'Sucess', [
{text: 'OK', onPress: () => console.log('OK Pressed')},
]);
})
.catch((err) => {
console.log("Error: " + err.message); // console.log('OK Pressed')},
]);
});
} catch (err) {
console.warn(err);
}
Подробнее здесь: https://stackoverflow.com/questions/784 ... r-0-com-ap