Reputation: 13508
I'm writing an iPhone app to retrieve all songs from a users iPod library on their iPhone, but I don't want to use the MPMediaPickerController
. Meanwhile, I will display the songs in a custom ListView/TableView.
I've written a query to select all songs from the users iPhone:
MPMediaQuery mq = new MPMediaQuery ();
var value = NSNumber.FromInt32 ((int) MPMediaType.Music);
var type = MPMediaItemProperty.MediaType;
var predicate = MPMediaPropertyPredicate.PredicateWithValue (value, type);
mq.AddFilterPredicate (predicate);
How do I run this against the iPhones iPod library without having to use the MPMediaPickerController?
Upvotes: 1
Views: 495
Reputation: 8606
The Items
property of the MPMediaQuery mq
will contain the results that you'd use to populate your view.
Upvotes: 3