The Intel® XDK "Cordova for Android" and "Crosswalk for Android" build systems use a special configuration file in your project source directory to direct the build process. The Cordova build option is based on the open source Apache* Cordova CLI build system. When you use the Cordova build option your application project files are submitted to the Intel XDK build server where a Cordova CLI system is hosted and maintained, there is no need to install the open source Cordova CLI system on your workstation.
The following options described on this doc page pertain only to Android and Crosswalk builds. They will not affect builds for other target platforms. It is generally okay to include these options in your build config file when submitting a build for other platform targets (such as iOS and Windows Phone 8); in most cases, these options will be ignored when building for those other targets.
NOTE: as of version 1199, the build configuration files are automatically generated based on input you provide on the Projects tab. A special
intelxdk.config.android.xml
andintelxdk.config.crosswalk.xml
file is automatically generated. The options described below can be use inside anintelxdk.config.additions.xml
file to exercise finer grained control over the Projects tab and to control features that are not handled by the Projects tab.
For detailed information regarding the structure and contents of theintelxdk.config.xml
file please read Using the Intel XDK Cordova Build Option article.
Android Launch Icon Specifications
If no icon files are provided with your project, the build system will provide default icons. It is highly recommended that you replace the default icons with icons of your own before submitting your application to a store. See this article on the Android Developer site for details regarding Android launch icons. If you do not provide custom icons it is likely that your application will be rejected from the Android store.
Icon files must be provided in PNG format. The height and width numbers in the table (below) are in pixels.
Density | Width | Height |
---|---|---|
xxxhdpi ‡ | 192 | 192 |
xxhdpi † | 144 | 144 |
xhdpi | 96 | 96 |
hdpi | 72 | 72 |
mdpi | 48 | 48 |
ldpi * | 36 | 36 |
* ldpi icon files are optional; if not provided the Android OS will automatically downscale your hdpi icon by a factor of two.
† xxhdpi icon files are only supported on hi-res Android 4.4 and above devices; these icon resolutions are not supported by Cordova 3.3.
‡ xxxhdpi icon files are not supported by any Android devices, at this time; these icon resolutions are not supported by Cordova 3.3.
The launch icon you include with your application, when you submit it to the Google Play Store, must be 512x512 pixels in size. This icon is not included in your application, it is part of your store submission package. The Intel XDK does not include a store submission tool, you must submit your application manually using your Android developer account.
Android Splash Screen Image Specifications
Your application will display a splash screen during initialization. This is done to provide a "getting ready" indication while your app and the underlying device API infrastructure initializes. The build system provides default images if no splash files are provided with your project. It is highly recommended that you replace the default splash screen images with your own before submitting your application to a store. See the splash screen section of the Cordova for * Build Options article for more information.
Splash screen images can be provided in PNG, JPG or JPEG formats. The height and width numbers in the table (below) are the minimum recommended pixel sizes for the respective screen densities. See this article on the Android Developer site for details regarding Android screen sizes. NOTE: the dimensions shown below assume a landscape orientation, reverse the numbers for portrait.
Density | Width | Height |
---|---|---|
xhdpi | 960 | 720 |
hdpi | 640 | 480 |
mdpi | 470 | 320 |
ldpi | 426 | 320 |
For greater adaptability of your splash screens, you should use 9-patch images. For more information see this StackOverflow posting and Android developer tools article.
NOTE: there have been issues with splash screens on the Cordova for Android platform when building with the Intel XDK. We have resolved the issue regarding landscape and portrait splash screens (they now work as expected). However, we are still working on making nine-patch splash screens work. When nine-patch splash screens work this notice will be removed. Until then for best results, design your splash screens to a 16:9 screen ratio and that should minimize the distortion on most modern Android phones and tablets (for example, the Samsung S3 has a 16:9 screen ratio and the Nexus 7 tablets have a 16:10 ratio). The splash screen resolutions specified above are minimum recommend dimensions, not absolute required dimensions.
Android Build Preferences
android-minSdkVersion |
---|
Specifies the minimum required Android operating system version on which the application will install and run. For best results it is recommended that you specify Android 2.3.3 or higher (Android 2.3.3 = 10), this value is the default if no minimum is provided. See "Versioning Your Applications" for an overview regarding how to assign version numbers to Android applications. |
<preference name="android-minSdkVersion" value="<N>" /> |
<N> is a number representing the minimum supported Android version. |
android-targetSdkVersion |
---|
Specifies the target Android operating system. This is the version of Android you have tested against and will be used by the operating system to insure that future versions of your application continue to run by observing compatibility behaviors. See "Versioning Your Applications" for an overview regarding how to assign version numbers to Android applications. |
<preference name="android-targetSdkVersion" value="<N>" /> |
<N> is a number representing the target Android version.The value 19 is recommended to minimize the effect of Android 4.4 "webview quirks mode" when running your application on Android 4.4+ devices. However, some applications may need this "webview quirks mode" behavior and should then specify a lower API level (such as 17 or 18) Start with 19 and insure your app works on Android 4.4+ devices; if you see issues on Android 4.4+ devices, try using 17 or 18 and see if your app works better there. |
android-installLocation |
---|
Specifies where the application can be installed (internal memory, external memory, sdcard, etc.). |
<preference name="android-installLocation" value="<LOCATION>" /> |
<LOCATION> indicates where the application can be installed. |
android-windowSoftInputMode |
---|
Specifies how the application interacts with the on-screen soft keyboard. |
<preference name="android-windowSoftInputMode" value="<INPUTMODE>" /> |
<INPUTMODE> determines the state and features of the keyboard. |
android-permission |
---|
For adding application device permissions. |
<preference name="android-permission" value="<PERMISSION"> /> |
<PERMISSION> is the permission identifier. The list of valid permissions may vary depending on the version of the Android operating system that is targeted. See the Manifest Permission List on the Android Developer site for a complete list of Android permissions.NOTE: the NETWORK permission will always be part of your Cordova application, even if no Cordova plugins have been included in your application. This is due to the way the Cordova framework communicates ("bridges the gap") between the HTML5 JavaScript layer and the underlying native code layer. |
android-signed |
---|
Allows you to indicate if the application will be signed (for distribution in the Android store). |
<preference name="android-signed" value="<bool>" /> |
<bool> indicates whether the application should be signed. A value of "false " indicates the application will not be signed, and "true " indicates the application will be signed. The default is "true ". |