Intel XDK Hello World Sample

The source code for this sample can be found here: https://github.com/gomobile/sample-helloworldupdate or download the Intel(R) XDK to check out all the HTML5 Samples.

Purpose

The purpose of the Hello World sample is to provide a basic starting point for HTML5 developers just getting started using the XDK to create mobile hybrid apps. It will add the JavaScript bridge library, wait for it to start, and then hide the splash screen. Finally, a single button on the screen demonstrates how to use that API to access native features while leveraging the best practices of CSS for responsive button controls.

Source Code

The start up process that loads and sets up the JavaScript API bridge is included in the Hello World sample to give developers a look at how they might start their hybrid application. It is found in js/main.js.

Also, a sample button is dropped into the HTML <body> tag and powered by the following code also found in js/main.js.

Easter Eggs


In the index.html file, there is a line to include the js/debug.js JavaScript file, but it is commented out. If that comment is removed and the code is added, two more buttons will appear in the application. They can be used to test the XDK's debug capabilities.

Testing

This sample application has been tested on a variety of iOS and Android devices. Since it relies on some HTML5 specific CSS it may not function appropriately on older desktop browsers.