
MobiOne Studio's App Center Builder service enables you to build Android applications (.apk files) that you can install onto your Android devices or upload to an Android marketplace for distribution. The app builder process is performed using the MobiOne Build Android Application wizard. This wizard walks you through a series of forms that collects the required information to build a custom application. In this tutorial you learn how to:
Note: To create Android applications for marketplace distribution, you are required to provide provision data files as input to the build process. If you are unfamiliar with the Android provisioning data files, Section 5 instructs you on how to acquire these files. For ad hoc testing purposes, no provisioning data files are required.
When you build an Android application with MobiOne, optimized HTML5 mobile web source code is generated from your UI design files. The mobile web source files are then uploaded to the MobiOne App Center cloud service where they are compiled into an Android application. The Android Build Application wizard walks you through entering the information required to build your application.



Note: You can add additional files by clicking the Import icon
.

Accept the default application package name, or enter a different name. The name must be unique and conform to standard Java package naming guidelines. Select the Make Signing Data Default checkbox to retain your digital signing selections as defaults.



When you include an email address that is accessed from your Android device, you receive notification on your device when the build completes. The notification includes a link from which you can install the app onto your device.

- With the Desktop Notification checkbox selected, you receive a popup notification on your computer screen when the build is complete. The notification displays the file location of the .apk application file or an error log if the build failed. Clicking this link opens the folder containing the app (.apk) file.

The Application File (.apk) and its
Location
The application build process creates your
app in the form of an installation file with an .apk extension. The .apk file is automatically downloaded from the MobiOne
App Center and stored in a <.mobi filename>-android folder in the same folder as your main project UI design file.
For example, if your UI design file is named myApp.mobi,
your application file is placed in a folder named myApp-android.
A copy of the .apk file is
retained by App Center to support wireless (over-the-air)
installation described in Section
4.

If you build an application multiple times, the resulting .apk files are not overwritten. Instead, a version number in parenthesis is added to the filename. The example above contains (1) in the filename, indicating it is the second build of form.apk.
Monitoring the Build Process - Progress
View
Depending on the size of your application and
the load on MobiOne App Center Builder servers, your application
build process can take from 30 seconds up to 10 minutes. While
waiting for your build process to complete, use the Progress
view to observe the stages as your build progresses. You can
also cancel a build process by clicking the Stop icon
.
Completed build jobs include a link to access the newly created Android application or error.log information in cases where a build fails.

Desktop Notifications
Depending up on
how you configured notifications in the Build Android Application
wizard, you can receive desktop notifications and email
notifications when your build process completes. A desktop
notification is a popup dialog that appears in the lower right
corner of your computer display.

If you configured your build process to send email notifications, you will receive an email notification similar to the one shown below.
When you tap the link in the email, the following page appears.

Tap Download Now, and your app begins downloading onto your device. After downloading the app, view your downloads and touch your app to begin installation.
Note: Do not attempt to open the installer URL in the MobiOne Test Center. Test Center is not able to run binary app files.
To upload your Android app for distribution through an Android marketplace, such as Google Play or the Amazon Android Store, you must build your application to include digital signature information. The following are the required digital signature files, and you include these when you run the Build Android Application wizard.
Private Key file
The private key (PK) file is created at the same time as the digital certificate file. It is used in the MobiOne application build process to encrypt the key file. This file should be kept safe and private.
Digital Certificate file
An Android application must be digitally signed with a valid digital certificate in order for you to distribute the file via an Android marketplace.
To begin, you will create a private key file (PK) and digital certificate file (.cer) using the MobiOne Digital Signing Utility. The signing utility generates both Android and iOS digital signature files simultaneously. The resulting file is a .zip file that you download to your computer. These files are used in the MobiOne application build process. Be sure to store the respective files together; they must be used as a pair when building applications.
Please Read - Before generating any files, here is a little housekeeping advice. Always create a special folder into which the certificate files saved. It is critical that you never mix different versions of the private key and certificate files. Doing so results in errors when you attempt to use the data in the application build process.
The first step is to use the MobiOne Signing Data Utility to create certificate and private key files, which you will then download to your development machine. The certificate file is named certificate.cer, and the private key is named private.key. Both files are required for building an Android application for distribution via an Android marketplace. These files are not required as part of the build for ad hoc testing on a device.
The certificate created using the MobiOne Signing Data Utility is a self-signing certificate. Although this is generally accepted for apps submitted to Android Marketplaces, a certificate from a signing authority, such as godaddy.com, is considered more reliable and safer than self-signed certificates.
Note: The process of generating certificate and private key files needs to be done only once.



Notes:
See the following sites for information and instructions on publishing your application to make it publicly available:
Below are the high level steps for building an Android app for ad hoc testing, and then building for submission to an Android marketplace.