A light native module based on react-native-get-music-files, to get Android local tracks.
$ npm install react-native-music-files --save
$ react-native link react-native-music-files
Ensure to add
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
in your Android manifest file and check for permissions.
import {getTracks, MusicFile} from 'react-native-music-files';
getTracks().then(tracks: MusicFile[] => {});
on Android greater than 19 getTracks()
runs on a seperate thread and doesn't block your UI thread.