Software Archive
Read-only legacy content
17061 ディスカッション

Trouble getting Started with XDK

David_W_16
ビギナー
738件の閲覧回数

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 件の賞賛
5 返答(返信)
Anusha_M_Intel1
従業員
738件の閲覧回数

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. 

David_W_16
ビギナー
738件の閲覧回数

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.

David_W_16
ビギナー
738件の閲覧回数

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..  

PaulF_IntelCorp
従業員
738件の閲覧回数

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.

David_W_16
ビギナー
738件の閲覧回数

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

返信