开发者

Custom iPod Player doesn't update MPMediaItem Values like MPMediaItemPropertyLastPlayedDate

开发者 https://www.devze.com 2023-04-10 14:41 出处:网络
I want to scan the users iPod library with an App. therefore i want to use MPMediaItemPropertyLastPlayedDa开发者_如何学JAVAte for getting the time in seconds (or days, hours) when the song was played

I want to scan the users iPod library with an App. therefore i want to use MPMediaItemPropertyLastPlayedDa开发者_如何学JAVAte for getting the time in seconds (or days, hours) when the song was played the last time.

Problem is, that if i play that song my playing terface within the app (just a view with artwork, title and a play/pause button), the MPMediaItem doesn't get updated in the iPod Library.

is there a way to manually update that just played MPMediaItem after i pressed the play button within my own app.

i guess its supposed to happen somewhere here:

- (void)mediaPicker:(MPMediaPickerController *)mediaPicker didPickMediaItems:(MPMediaItemCollection *)theCollection {    
   ... HOW SHOULD I TELL THE IPOD LIBRARY TO UPDATE e.g. LastPlayedDate or PlayCounter
}


It updates the data, just listen the whole song. After the next song has begun, the last played date and playtime will be set.

It is woring with sharedmusicplayer. I haven't tried with application music player.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号