can i store or just create a customize view which allow user to play songs within from my application when user clicks on songs at that time the iphone's iPod(MusicPlayer) picker should not open it just show all songs in my application in TableView or PickerView it allows user to select the songs within my created customized view that TableView or PickerView.i have also seen this example. but it just opens the music player picker view. did you get my point is this possible to do that within my application.?
- 1
- 1
- 2,197
- 5
- 30
- 63
-
Yes this is possible to do that within Your application. – Ayaz Apr 19 '12 at 05:17
-
@Ayaz can you just show me the way how can i do that in my application? – Hrushikesh Betai Apr 19 '12 at 05:19
-
Yes, you can do it , just search for sound cloud API which gets the songs in your iPod app to your app – Charan Apr 19 '12 at 05:25
-
@SreeCharan i am new bee for that can you provide me some idea or example code that can help me.? – Hrushikesh Betai Apr 19 '12 at 05:33
-
@Hrushikesh this link you full for you http://www.codigator.com/tutorials/how-to-make-a-custom-ios-music-player/ – Jul 04 '14 at 06:52
4 Answers
create one view for showing data and create another view to show or play song's. save all your songs in resource or in Library Fitch the songs & play.
- 1,398
- 15
- 29
-
but question still remains how can i show data in my customize tableview or picker view. how can i get that all songs from ipod music player to show in my tableview where user selects some particular song and change the songs within that. – Hrushikesh Betai Apr 19 '12 at 05:32
You can do, get songs from iPod library. But you could not view it in iPhone simulator. The list of songs name is showed only in device. If u run in iPhone simulator then it shows errors.
This is the example article for u. its useful for get songs from iPod library and play songs.
The Music Player Framework in iPhone SDK 3.0
is the best example for you.
- 9,750
- 1
- 59
- 91
- 2,045
- 2
- 19
- 41
-
hey i do not want to open music library have you seen the links `i have also seen this example.` i want to show the songs in picker view my customize picker view. – Hrushikesh Betai Apr 19 '12 at 09:24
-
yeah. i understood ur question. u cant run it in sdk. You can only possible to run in iphone device. – Ravi Kumar Karunanithi Apr 19 '12 at 09:35
-
ok dear that means we can't create customize table or picker which contains songs of user's iPhone device without opening the media picker? – Hrushikesh Betai Apr 19 '12 at 09:40
It seems to me that maybe you're trying to run before you can walk. It is possible to do what you ask but it is not a trivial amount of code and would involve a considerable effort for someone to describe to you how to do it. Perhaps if you start by using apple's built in offerings and then extend your app you'll learn as you go along. There are examples of how to create a tableview and populate it with your own data. There are also examples of how to access the ipod music library and query it to get whatever you want from it. Your job is to tie these two things together.
- 3,016
- 30
- 43
-
yes i understand that i have to tie both things but can i get the iPod music list in an array because to show details in table view or picker view you have to use an array. – Hrushikesh Betai Apr 20 '12 at 10:43
-
1from the iPod Library Access Programming Guide... MPMediaQuery *everything = [[MPMediaQuery alloc] init]; NSLog(@"Logging items from a generic query..."); NSArray *itemsFromGenericQuery = [everything items]; for (MPMediaItem *song in itemsFromGenericQuery) { NSString *songTitle = [song valueForProperty: MPMediaItemPropertyTitle]; NSLog (@"%@", songTitle); } – amergin Apr 22 '12 at 12:45
Yes Amergin is write, this is the good way to get the list. Also if you want to enumerate the content of an MPMediaItem, here's a good method to do that : http://www.wptechnology.com/articles/2013/06/16/how-to-nslog-an-mpmediaitem/
- 86
- 4