AS3 - Access iPhone music library and return refer

2019-04-12 23:20发布

问题:

I was just wondering if anyone had any ideas on how to read the music library on an iPhone from an AS3 Air application?

Would it require an Adobe Native Extension, or is there a easier way to achieve this?

Ideally what I'd like to do is just popup the phone's music player, to allow users to pick either a track, album or playist, and then return those songs to my app to add to my own playlist.

(Also, possibly a separate question entirely, I will need to do this for Android, Windows and Mac too, if anyone has any useful tips on the most efficient way to approach this across all these platforms, it'd be hugely appreciated).

Thanks in advance, Ted

回答1:

To access nearly anything on the native side of iOS or Android, save for the Camera Roll, Camera, WebView, and Video, you need an AIR Native Extension to do it.

For accessing audio from the device's library, you can use the SongPicker ANE, which allows you to play tracks in the device's library and access basic metadata, although it won't give you access to the song data itself.