https://github.com/flyerhq/react-native-android-uri-path
Get an absolute path to a file retrieved by Android's Intent.ACTION_GET_CONTENT that returns a content URI.
https://github.com/flyerhq/react-native-android-uri-path
absolute-path android intent kotlin react-native resolver
Last synced: 11 months ago
JSON representation
Get an absolute path to a file retrieved by Android's Intent.ACTION_GET_CONTENT that returns a content URI.
- Host: GitHub
- URL: https://github.com/flyerhq/react-native-android-uri-path
- Owner: flyerhq
- License: mit
- Archived: true
- Created: 2020-09-16T22:48:23.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-05-07T12:15:09.000Z (almost 4 years ago)
- Last Synced: 2024-12-30T13:38:10.627Z (about 1 year ago)
- Topics: absolute-path, android, intent, kotlin, react-native, resolver
- Language: Kotlin
- Homepage:
- Size: 626 KB
- Stars: 31
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Native Android URI Path
⚠️⚠️⚠️ https://github.com/rnmods/react-native-document-picker/issues/70#issuecomment-846883668 also mentioned in the README of the document picker repo as well, is the correct way to retrieve the path. This repo will be archived. ⚠️⚠️⚠️
[](https://www.npmjs.com/package/@flyerhq/react-native-android-uri-path)
[](https://github.com/flyerhq/react-native-android-uri-path/actions?query=workflow%3Abuild)
[](https://codeclimate.com/github/flyerhq/react-native-android-uri-path/maintainability)
Get an absolute path to a file retrieved by Android's `Intent.ACTION_GET_CONTENT` that returns a `content://` URI.
## Getting Started
```bash
yarn add @flyerhq/react-native-android-uri-path
```
⚠️ Use version `2.1.3` for React Native below `0.65.0` and latest for `0.65.0` and above
## Usage
```ts
import getPath from '@flyerhq/react-native-android-uri-path'
const path = getPath(uriString)
```
Other platforms will return `uriString`, so no need to use `Platform`.
## License
[MIT](LICENSE)