Not returning anything with "react-native": "0.60.5"
See original GitHub issueIdk whether this is because of the react native version or something else make this happen. So I’ve just integrating my android app with react native and migrating to AndroidX. Before I did the integration and migration, this code is perfectly fine, I get the result and everything. But, after the integration and migration, I only can see and click the photo from the picker, there’s no result, console.log(res) does not working, and even I don’t get any error.
Please help
This is the code that I’m using: `try { const res = await DocumentPicker.pick({ type: [DocumentPicker.types.images], });
console.log(res)
if (res.size <= 3145728) {// 3 MB
dispatch({
type: ACTION_TYPE_PICK_PHOTO_PROFILE_SUCCESS,
payload: res,
});
} else {
dispatch({
type: ACTION_TYPE_PICK_PHOTO_PROFILE_EXCEED,
payload: res
});
}
} catch (err) {
console.log(err)
if (DocumentPicker.isCancel(err)) {
// User cancelled the picker, exit any dialogs or menus and move on
}
}`
Thanks in advance
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
In react-native 0.60.5, unable to call class function using this ...
Bind your func() method in the constructor itself constructor(props) { super(props); this.state = { }; this.func = this.func.bind(this); }.
Read more >startDeviceScan not returning any values in Android - GitHub
Previously it worked on an android device but after an upgrade of react-native from 0.60.4 to 0.60.5 it does not work anymore ....
Read more >Upgrading to new versions - React Native
Upgrading to new versions of React Native will give you access to more APIs, views, developer tools and other goodies.
Read more >@react-native-community/netinfo - npm
If this API is not available the library will safely fallback to the old onLine property and return basic connection information. Migrating from ......
Read more >React Native - Branch Help
The promise will only return one result. It will not continue to return results when links are opened or wait for a link...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Solved. Turns out I forgot to add the function for onActivityResult. This is the code that I used.
`private final int OVERLAY_PERMISSION_REQ_CODE = 1;
closing as the issue is resolved: https://github.com/Elyx0/react-native-document-picker/issues/241#issuecomment-532088033