How to submit a program to Android Market

Source: Internet
Author: User
How to submit a program to Android Market2011/04/02

Sign your program
Overview
Note:

All programs submitted to the Market must be signed. Unsigned programs cannot be installed.
You can use a personal certificate to sign the program. It does not have to be authorized by the certificate authority.
Programs signed with the Debug version certificate cannot be released.
During installation, the system checks whether the signature certificate has expired. If the program certificate expires after installation, the program can also be used normally.
You can use keytool and Jarsigner to generate a key and sign your program.
L your program needs to be optimized using zipalign after being signed.
Suggestion:

Sign all programs with the same key to ensure seamless upgrade of the program.
The certificate is valid for more than 25 years. In a program published to the Market, the certificate is valid until January 1, October 22, 2033.

How to sign
In addition to the method mentioned below, there is also a way to compile using GUI.

In
In Eclipse, select the project to be compiled in Package Explorer, File-> Export, open the Android folder, and select Export
Android Application: complete the wizard step by step. In this way, the program will be compiled, signed, optimized, and can be directly published to the Market.

Obtain an appropriate private key
Use Keytool to generate private keys. Keytool is in the JDK/bin directory (for example, C: \ Program Files \ Java \ jdk1.6.0 _ 20 \ bin ). Keytool Parameters
Description

-Genkey
Generate public and private keys

-V
Output details

-Keystore <keystore-name>. keystore
Generated keystore file name

-Alias <alias name>
The alias of this key. Retain only the first 8 characters

-Keyalg <alg>
Encryption algorithm. Support for DSA and RSA

-Dname <name>
The Creator information used to describe this key. If not, Jarsigner will prompt you to enter this information

-Validity <valdays>
Key validity period, by number of days. Best> 10000

Example: keytool-genkey-v-keystore my-release-key.keystore-alias alias_name-keyalg RSA-validity 10000
More information about keytool: http://java.sun.com/j2se/1.5.0/docs/tooldocs/#security
Compile the Release version Program
In
In the release status, the program is unsigned. Export the unsigned release apk file in Eclipse. In Package
Find the project to be compiled in Explorer, right-click and choose Android Tools> Export Unsigned Application
Package

Private Key signature
Use Jarsigner to sign private keys.

Example: jarsigner-verbose-keystore my-release-key.keystore my_application.apk alias_name

Verify the signed program: jarsigner-verify my_signed.apk

Optimize APK files
Use zipalign to optimize the apk file. Zipalign can be found in the Andorid SDK/tools directory.

Example: zipalign-v 4 your_project_name-unaligned.apk your_project_name.apk

Your_project_name-unaligned.apkis input, and your_project_name.apk is output. To overwrite existing files, add the-f parameter.

Add version information
There are two main aspects: one is the version number of the program, and the other is the version number of the system API required by the program. Both must be set in AndroidManifest. xml.

Program version
Android: versionCode: int type, which can only be an integer. Other programs are used for calling and cannot be seen by the end user.

Android: versionName: string type. It is for the end user.

System API version number required by the program
Android: minSdkVersion: the lowest system API version required to execute this program

Android: targetSdkVersion: the API version of the target system during program design.

Android: maxSdkVersion: the highest system API version supported during program design.

Prepare for release
Check List before release:

Before considering releasing a program

1. Complete testing on real devices

2. consider adding an End User License Agreement to the program

3. Add icons and titles to the program

4. Close and clear log and debug information

Before the final compilation

5. Add the version number. (If this version number is used, you can see it after it is added here .)

6. obtain the appropriate key

7. If the Mapview element is used, register the Maps API key.

After the program is compiled

8. Sign the program

9. Test the compiled program

Publish a program to Android Market
1. registered account: http://market.android.com/publish

2. Before submitting a program, make sure that the program meets the requirements of the Android Market Server:

(1) The private key signed for the program must be valid after January 1, October 22, 2033.

(2) android: versionCode and android: versionName must be set in the program. The former is used for program updates, and the latter is displayed to the end user.

(3) android: icon and android: label must be defined in the manifest of the program.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.