5

I'm thinking of using Kivy to develop my first mobile app (mainly because i don't want to have to learn any new languages). This app would require access to the user's music library files & metadata. I was looking through Kivy's API Reference and couldn't find anything that would fit as a solution. The Audio Module gave me the impression of background music or SFX functionality.

My question is, is Kivy strictly for creating GUI for applications? If not, could someone provide me an example of how one would go about accessing a user's music library on a mobile device using Kivy/python?

Thanks in advance.

Noob Saibot
  • 4,573
  • 10
  • 36
  • 60

1 Answers1

3

If i understand you well, you want access to the place where the OS store the user's music, not just files provided by yourself, on that, kivy doesn't provide any abstraction, it's up to you either to know the one place they should be on your target plateforms (android/ios i guess), or how to ask the OS where they are, you could use pyjnius (for android) and pyobjus (for ios although it's less advanced right now), to ask for that through the native api, then use kivy api to play them, and if you want to read file metadata, use the usual python libs for that, and for library metadata, i guess that's the native api that should give them.

e.g:

look promising, but i didn't experiment with them.

To answer the more general question, kivy targets the UI mainly, but try to provide abstractions for the plateforms different ways of doing thing where needed, we don't have everything yet, but at least low level things (notice how you use the same method to load/play an audio file on all plateforms? it's not a given :)), are here.

Tshirtman
  • 5,859
  • 1
  • 19
  • 26
  • Wow...this is going to be difficult then. Thanks for clearing that up for me. – Noob Saibot May 27 '13 at 02:01
  • Not necessarily very difficult, pyjnius actually makes using most of the android API very easy, and you just want to get values there, it's potentially just a few lines of code. – Tshirtman May 29 '13 at 19:52
  • How would I do this in pyobjus? Are there any tutorials I can look at on accessing in-phone data? – Noob Saibot May 31 '13 at 17:23
  • I know less about pyobjus (and ios in general, i didn't try it), it may be a bit young to do such thing yet, for what i got from @tito, but it's worth a try. – Tshirtman Jun 01 '13 at 23:39