Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rn-native-media-picker

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-native-media-picker

A React Native library for picking media (images and videos) from the native media library.

  • 1.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
decreased by-38.89%
Maintainers
0
Weekly downloads
 
Created
Source

rn-native-media-picker

A React Native library for picking media (images and videos) from the native media library.

You can use this project as a sample module yourself. Remember to give feedback and contribute to improving it. If you think it is helpful, give me a star. Thank you so much!

Notes

Android:
  • Custom UI media picker that can handle READ_MEDIA_VISUAL_USER_SELECTED (Android 14 and above) with built-in request/check permissions.
NoPermissionDescription
01android.permission.READ_EXTERNAL_STORAGEAllows an application to read from external storage (API level 32 or lower)
02android.permission.READ_MEDIA_IMAGESAllows an application to read image files from external storage (API level 33 or higher)
03android.permission.READ_MEDIA_VIDEOAllows an application to read video files from external storage (API level 33 or higher)
04android.permission.READ_MEDIA_VISUAL_USER_SELECTEDAllows an application to read image or video files from external storage that a user has selected via the permission prompt photo picker (API level 34 or higher), should be requested alongside 02 and 03
IOS:
  • Just a simple media picker.

Installation

npm install rn-native-media-picker

Demo

Android:

https://github.com/user-attachments/assets/471749de-b3ef-459c-9890-12870fa0a700

IOS:

https://github.com/user-attachments/assets/533fdb64-0fbd-4844-a14f-0e07e76d6c85

Usage

import { launchLibrary, IOptions } from 'rn-native-media-picker';

// ...

const onLaunchLibrary = () => {
  const options: IOptions = {
    isMultipleSelection: false,
    maxSelection: 1,
    mediaType: 'image',
  };
  launchLibrary(options).then((result) =>
    console.log('result', result)
  );
};

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Keywords

FAQs

Package last updated on 08 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc