Software Archive
Read-only legacy content
17061 Discussions

Trouble getting Started with XDK

David_W_16
Beginner
745 Views

I am having trouble starting with XDK.  I just want to make a HELLO app, that when someone hits a button, a OGG file of my choice plays.  What folder do I put the OGG file in?  How  I can put the HTML5 media object in there.. how to associate it with the file that I want to play?  I searched the forums and I can find no info to get me started.

0 Kudos
5 Replies
Anusha_M_Intel1
Employee
745 Views

Hi David, the audio player sample app is one you might find useful. It ships with the XDK. So once you launch it, go to:

Start a new project -> Samples and Demos -> HTML5+Cordova. It is on the first row.

That sample shows how to use HTML5 audio tag, cordova media plugin and a low latency audio plugin to play audio. You can include your music file anywhere within the 'WWW' folder. The sample has a separate folder called 'sounds' in which it stores and references three wav files. We don't suggest you use the HTML audio tag as it doesn't work well in the webviews on many devices. 

You can use the cordova media plugin instead. You can choose to just start with the sample and remove bits you don't need. 

0 Kudos
David_W_16
Beginner
745 Views

Got it to work thanks.. but not with the Cordova sample app.. that is coming up giving me an error.  I will copy it down and post that error.  thank you for the swift replies.

0 Kudos
David_W_16
Beginner
745 Views

NativeAudio.preloadSimple

The program under test has called the native part of a Cordova plugin that is unknown to the emulator.

It appears that we are missing emulation for that API.

Push the Fail button to continue the API by calling the fail callback. 
Push the Success button to continue the API by calling the success callback.

 

What does this mean?  DUH..  

0 Kudos
PaulF_IntelCorp
Employee
745 Views

The Emulate tab is telling you that it cannot simulate that API that you called. The Emulate tab can only simulate the core Cordova plugins. After that it relies on you to deal with non-core plugins. Best to use an Android device attached to the Debug tab, that will work with all plugins.

0 Kudos
David_W_16
Beginner
745 Views

Thanks.. I got it to work! I am studying now..going through the videos one by one.

0 Kudos
Reply