This tutorial shows you, the developer, how to build your application written using the Intel® XDK for the Intel XDK "legacy" container and generate a Google Android* binary .APK file. It also provides guidelines about how to deploy it to the Google Play* store. Although this tutorial shows the Google Android build screens, the steps are also used for Amazon* and Barnes & Noble Nook* builds.You can also watch a video tutorial that walks you through the build and deploy process for legacy Android apps at the following URLs:
- Build: http://software.intel.com/en-us/xdk/videos/building-an-html5-app-for-google-play
- Deploy: http://software.intel.com/en-us/html5/videos/deploying-apps-to-google-play
Building a Google* Android Binary
Use the Intel XDK development environment to develop, debug, and test your project's app. After you successfully test your app using the Test tab in the Intel XDK and App Preview on your device(s):
- Select the project for the app you want to build.
- Click the Intel XDK Build tab.
- Under Legacy Hybrid Mobile App Platforms, click the button under Android to build an Android binary you can submit to the Google Play store:
Alternatively, under Legacy Hybrid Mobile App Platforms, to build the app as an Amazon* or Barnes & Noble Nook* binary, click the button under:
- Amazon to build for the Amazon App store for Android.
- Nook to build for the Nook Store.
- Before your app can be built in the cloud, your code will be packaged as a bundle and uploaded. If a previous build is found, you can decide whether to use the previous upload (Use Previous) or upload your most recent code (Upload Code).
- After uploading your app bundle, review the dashboard for Details, Assets, Plugins, Credentials, and Push information in the Overview screen. For a new app, you need to answer a series of questions to provide the app title, icons, splash screens, and related information. To review or edit this information, click the step name near the top (such as 1 Details) or click the button in the right column.
For each build step that was set up previously, you should see a green check mark and Step Complete indicator. If not, the condition will be indicated by a red Step Incomplete indicator. In this case, click to display the incomplete build information described below in Android Build Settings. Later, when each of the five steps has a green checkmark, you can build your app to create an .APK file for your Android device.
Android Build Settings: Details, Assets, Plugins, Credentials, and Push
For this tutorial, we will walk through each step individually. Instructions are also provided within the Build tab.
On the Details step, you will be asked to provide the Application Title of your application as it will appear on the device. By default, the rightmost portion of your project name is used. For example, if your project name is testuser.exampleandroid, the default app name will be exampleandroid.
Be aware that on some devices, if the Title is too long, it will be truncated with an ellipsis or broken to a second line. As a rule of thumb, limit the application name to less than 19 characters. Similarly, in the URI Scheme, use alphanumeric characters and the following special characters: hyphens, plus sign, and minus sign.
You will also need to provide a version number for this build of the application. You may set this number so that you can track which version of the application is in the market.
You will be asked a list of questions about the application’s permissions. Answer the questions appropriately to allow all the functionalities required by your application while removing any permission that is not needed. By default, applications are built with permissions to all functionalities of the device. You can alter these build permissions by turning them on/off on this build screen. Also provide the device configuration and operating systems your app is targeting. Currently 4.2 is the only Operating System choice, however your app should run on any Android device using Android.
These options are available:
- GOLD – The current fully tested, publicly available code base that contains complete support for all Intel APIs.
- LEAN – The current fully tested, publicly available code base that contains limited support for Intel APIs. Items NOT supported are streaming shoutcast or mp3 support, barcode scanning support, rich media push viewer support, and App Game Interfaces (AGI) support.
- LEAN WITH APP GAME INTERFACE – The same as LEAN but App Game Interfaces are supported.
Choosing either of the LEAN options will reduce the size of your binary. One of these is recommended if your application does not require support for the excluded items.Once you have completed all items, click the button. This displays the Assets step.
To complete your build, you will need a series of assets such as launch icons and splash screens.
In this step, you have an option to create your application for landscape or portrait mode. Once you have the initial orientation set, you will need to upload the appropriate assets for the application. By default, a set of Intel XDK icons are used. This allows you to build and test without creating your own specific assets. Once you are ready to publish your application, you can upload your own asset files from this screen. As a starting point, you can download sample templates and directions for creating your own. The size and file format specifications for each asset are provided on the screen. You can drag and drop files into each Assets Submission field.
Once you have completed all items on this screen, click the button. This displays the Plugins step.
You can include custom native code known as “plugins” into your build.
To learn more about plugins, download the plugin documentation here:
After entering the information, click Create.
After either specifying the plugins you wish to include, or opting to add none, click the button to display the Credentials step.
In this step, provide your Facebook credentials if you want your app to be available as a Facebook application.
You will provide your Facebook Application ID which is required, and Facebook requires an additional layer of security for Android apps in the form of an application signature. A signature is provided that you may then use in the Native Android App section of the Facebook App Dashboard.
Once you have completed all items on this screen, click the button to display the Push step.
By default, all new apps are configured without push messaging. To use push messaging with Android devices, you will have to set up Google Cloud Messaging* (GCM) and type information, such as the GCM project id and API key.
If you want to enable push messaging, click the radio button for Configure this app for push messaging. Otherwise, leave the radio button unchecked and proceed to the next step by clicking the click the button.
|NOTE: Once you check the radio button for Configure this app for push messaging and click the button, you cannot easily undo this action. To uncheck Configure this app for push messaging, either click the Close Build Page button below the Projects tab, or close the project and reopen it.|
If you want to configure push messaging, after you click the radio button for Configure this app for push messaging, the screen expands so you can enter the required information (step 5b):
This screen provides links to help you with your GCM set up. A link to the GCM web page, and a walk through link takes you through the process.
When you set up GCM for your app, Google will provide you with a Project ID and API Key. Enter these values in the appropriate fields on the Push screen.
Once you have completed all items on this screen, congratulations, you are ready to build. Click the button. This will take you back to the to the Overview screen, where the green Build App Now button will be available if each of the five steps has been completed.
Build Your App
In the Overview screen, when the green Build App Now button appears, click the Build App Now button. A status indicator will show that the build is occurring:
If any build errors are detected, you will be notified. Once your binary is successfully built, the following screen appears.
- On your Android device, open the email sent to the Intel XDK account for your successful build and click the link of your app's URL.
- On your development system, click on the Download Build button and transfer the .APK file to your device by copying it over a wired connection or email it to your device. Once you have the .APK file on the device, select it to install the test application.
The email address associated with your Intel XDK account will receive an email notifying you of the successful build with a link to your app's URL. To send an email to others containing a link to your app's URL, type an email address at the bottom of the window and click the Send button. When done, click the Close button at the bottom of the screen to return to the Overview screen.To build for a different platform or to otherwise, return to the Intel XDK Build tab, click the Close Build Window button in the upper-left corner.
Deploy Your App
Open the following web site to begin the process of adding your app to the Google Play* store: http://play.google.com/apps/publishIf you have not done so already:
- Sign into your Google account.
- Accept the developer agreement, pay a small fee, and register. This gives you access to your Google Developer Console.
For a video of this process, see http://software.intel.com/en-us/html5/videos/deploying-apps-to-google-play.