Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 2 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 (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-07T12:15:09.000Z (over 2 years ago)
- Last Synced: 2024-06-17T11:33:58.348Z (3 months ago)
- Topics: absolute-path, android, intent, kotlin, react-native, resolver
- Language: Kotlin
- Homepage:
- Size: 626 KB
- Stars: 32
- 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. ⚠️⚠️⚠️
[![npm](https://img.shields.io/npm/v/@flyerhq/react-native-android-uri-path)](https://www.npmjs.com/package/@flyerhq/react-native-android-uri-path)
[![build](https://github.com/flyerhq/react-native-android-uri-path/workflows/build/badge.svg)](https://github.com/flyerhq/react-native-android-uri-path/actions?query=workflow%3Abuild)
[![Maintainability](https://api.codeclimate.com/v1/badges/b439310da19b3d6b3917/maintainability)](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)