0

I'm building an Ubuntu app in HTML5, using the Ubuntu SDK. From what I can tell, I should be using contentHub to access music files in /home/Music/, however I can't make heads or tails of the API. (https://developer.ubuntu.com/api/apps/html5/sdk-15.04/ContentHub.ContentHub/)

How exactly would I go about importing the files, and how would I interact with them after I did so, if I, say, wanted to display a list of all of them?

I assume I'd import it using api.importContent( type, peer, transferOptions, onError, onSuccess ) , but I have no idea what an acceptable value for peer would be.

| improve this question | | | | |
0

Here is a link to some code that I wrote that does exactly what I think you need:

http://bazaar.launchpad.net/~rick-rickspencer3/+junk/flash2/view/head:/components/AddSoundDialog.qml

This will leave any music files that the user picks in a Music directory in your apps's data directory.

| improve this answer | | | | |
  • Hey, thanks! I'll take a look, hopefully it will solve my lack-of-understanding/problems :) – Brian U Jan 26 '16 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.