access the music list and get the real file path on android and ios devices
string resultJson = NativeMusicAcessHelp.AccessHelper.GetAllMusicAndReturnJson();
the resultJson likes:
[
{
"id" : "music id1",
"title" : "music title 1",
"artist" : "artist 1"
},
{
"id" : "music id2",
"title" : "music title 2",
"artist" : "artist 2"
}
]
NativeMusicAcessHelp.AccessHelper.OnGetPath((string result) => {
// get the filepath info like: {"id":"music id1", "path":"musicFilePath"}
Debug.LogError(" music path result" + result);
});
NativeMusicAcessHelp.AccessHelper.GetFilePathByID("music id1");
modify Common.iOSMusicUsageDescription,it will auto modify the info.plist's NSAppleMusicUsageDescription field after build ios project