I am using react-native-get-musicfiles to get all music file but it crashes onCall musicFiles.getAll()

49 Views Asked by At

I am using react-native-get-musicFiles to collect all music files from my devices , but when i execute the code

MusicFiles.getAll({
      blured : true, // works only when 'cover' is set to true
      artist : true,
      duration : true, //default : true
      cover : false, //default : true,
      genre : true,
      title : true,
      cover : true,
      minimumSongDuration : 10000, // get songs bigger than 10000 miliseconds duration,
      fields : ['title','albumTitle','genre','lyrics','artwork','duration'] // for iOs Version
  }).then(tracks => {
      // do your stuff...
      // let trackInfoArray = [];
      // for (let i = 0; i < tracks.length; i++) {
      //   if (tracks[i]) {
      //     let trackInfo = new TrackInfo(tracks[i]);
      //     trackInfoArray.push(trackInfo);
      //   }
      // }
      
      // ToastAndroid.show(`There are ${trackInfoArray.length} tracks`, ToastAndroid.SHORT);/
  }).catch(error => {
      // catch the error
      console.log("err", error);
  })`
it crashes my app without showing any error? please help what is it that crashes my app?
0

There are 0 best solutions below