Step 1: Generating Android Certification
Utilize the Android Keytool from the Android SDK tools to create a certificate for signing Android applications. Below is a sample Keytool command that generates a private key:
$ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name
-keyalg RSA -keysize 2048 -validity 10000
Step 2: Installation of Sencha SDK Tools.
- Execute the Sencha SDK installation: SenchaSDKTools
(SenchaSDKTools-2.0.0-Beta)
- The sencha command along with the package option will be installed
to the specified location during installation (default:
Applications/SenchaSDKTools-2.0.0-Beta/command).
Step 3: Crafting a Packaging Configuration File for Native Packager.
The configuration file should adhere to the following format:
{
"applicationName": "<AppName>",
"applicationId": "<AppID>",
"outputPath": "<AppPackageOutputPath>",
"iconName": "<AppIconName>",
"versionString": "<AppVersion>",
"inputPath": "<PathToWebApp>",
"configuration": "<Release | Debug>",
"platform": "<Android | AndroidEmulator>",
"certificatePath": "<certificatePath>",
"certificateAlias": "<certificateAlias>",
"sdkPath": "/android-sdk-mac_86",
"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
],
"deviceType": "<Not applicable for Android>"
}
To generate a template of the configuration file, execute the command below:
sencha package generate <configTemplate.json>
represents the name of the configuration template file.
Note: Avoid using spaces in the path or filename.
The parameters below are specific to Android packages:
"applicationName":"<AppName>"
Defines the application's name (AppName). The resultant file will be named .apk.
"applicationId":"<AppID>"
Sets an ID for the application. Using a namespace like com.sencha.Touch2Package is recommended.
---Additional Content Omitted for Brevity---
To package a signed application and run it on a device, use this command:
sencha package <configFile.json>
An will be generated in the designated output location. This marked application can then be released for distribution.