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.

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.

  • 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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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