react-native-music-file-finder
v1.0.7
Published
React Native package to get music files from local and sd for iOS and Android
Downloads
10
Readme
react-native-music-file-finder
- get all music files and metadata in device.
- can get cover image.
This package currently supports android only.
Getting started
$ yarn add react-native-music-file-finder
Add the permission in AndroidManifest.xml.
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Usage
import RNMusicFileFinder from "react-native-music-file-finder";
useEffect(() => {
const getMusicFiles = async () => {
const musics = await RNMusicFileFinder.getAllMusics(true);
for (const music of musics) {
console.log(music);
}
};
getMusicFiles();
}, []);
Functions
getAllMusics(needImage?: boolean) if needImage is true, return the image`s path.
Example
https://github.com/KCH-clo/react-native-simple-audio-player#readme