Publishing Your Applications

Publishing quickview

  • You can publish your application using a hosted service such as Android Market or through a web server.
  • Before you publish, make sure you have prepared your application properly.
  • Android Market makes it easy for users of Android-powered devices to see and download your application.

In this document

  1. Publishing on Android Market
    1. Publishing Updates on Android Market
    2. Using Intents to Launch the Market Application

See also

  1. Preparing to Publish

Interested in publishing your app on Android Market?

Go to Android Market »

Publishing an application means testing it, packaging it appropriately, and making it available to users of Android-powered mobile devices for download or sideload.

If you've followed the steps outlined in Preparing to Publish Your Applications, the result of the process is a compiled .apk that is signed with your release private key. Inside the .apk, the application is properly versioned and any MapView elements reference a Maps API Key that you obtained by registering the MD5 fingerprint of the same certificate used to sign the .apk. Your application is now ready for publishing.

The sections below provide information about publishing your Android application to mobile device users.

Publishing on Android Market

Android Market is a hosted service that makes it easy for users to find and download Android applications to their Android-powered devices, and makes it easy for developers to publish their applications to Android users.

To publish your application on Android Market, you first need to register with the service using your Google account and agree to the terms of service. Once you are registered, you can upload your application to the service whenever you want, as many times as you want, and then publish it when you are ready. Once published, users can see your application, download it, and rate it using the Market application installed on their Android-powered devices.

To register as an Android Market developer and get started with publishing, visit the Android Market:

http://market.android.com/publish

If you plan to publish your application on Android Market, you must make sure that it meets the requirements listed below, which are enforced by the Market server when you upload the application.

Requirements enforced by the Android Market server:

  1. Your application must be signed with a cryptographic private key whose validity period ends after 22 October 2033.
  2. Your application must define both an android:versionCode and an android:versionName attribute in the <manifest> element of its manifest. The server uses the android:versionCode as the basis for identifying the application internally and handling updates, and it displays the android:versionName to users as the application's version.
  3. Your application must define both an android:icon and an android:label attribute in the <application> element of its manifest.

Publishing Updates on Android Market

At any time after publishing an application on Android Market, you can upload and publish an update to the same application package. When you publish an update to an application, users who have already installed the application will automatically receive a notification that an update is available for the application. They can then choose to update the application to the latest version.

Before uploading the updated application, be sure that you have incremented the android:versionCode and android:versionName attributes in the <manifest> element of the manifest file. Also, the package name must be the same and the .apk must be signed with the same private key. If the package name and signing certificate do not match those of the existing version, Market will consider it a new application and will not offer it to users as an update.

Using Intents to Launch the Market Application on a Device

Android-powered devices include a preinstalled Market application that gives users access to the Android Market site. From Market, users can browse or search available applications, read ratings and reviews, and download/install applications.

You can launch the Market application from another Android application by sending an Intent to the system. You might want to do this, for example, to help the user locate and download an update to an installed application, or to let the user know about related applications that are available for download.

To launch Market, you send an ACTION_VIEW Intent, passing a Market-handled URI string as the Intent data. In most cases, your application would call startActivity() to send the ACTION_VIEW Intent with the Market-handled URI.

The URI that you supply with the Intent lets the system route the intent properly and also expresses the type of action that you want Market to perform after launch. Currently, you can have Market take these actions:

  • Initiate a search for applications on Android Market, based on the query parameters that you provide, or
  • Load the Details page for a specific application on Android Market, based on the application's package name.

Initiating a search

Your application can initiate a search on Android Market for applications that match the query parameters that you provide. To do so, your application sends an ACTION_VIEW Intent that includes a URI and query parameters in this format:

market://search?q=<paramtype>:<value>

Using this URI format, you can search for applications by:

  • Package name
  • Developer name
  • String match across application name, developer name, and description, or
  • Any combination of the above

The table at the bottom of this page specifies the paramtypes and values that correspond to each of these types of search.

When you send an intent to initiate a search for applications, Market sends the search query to the server and displays the result. To the user, the experience is something like this:

  1. The user presses a link or button in your application.
  2. The Market application launches and takes control of the screen, displaying a progress indicator labeled "Searching" until it receives the search results.
  3. Market receives the search results and displays them. Depending on the query parameters, the search results may include a list of one or more applications.
  4. From the results page, the user can select an app to go to its Details page, which offers information about the app and lets the user download/purchase the app.

Loading an application's Details page

In Android Market, every application has a Details page that provides an overview of the application for users. For example, the page includes a short description of the app and screen shots of it in use, if supplied by the developer, as well as feedback from users and information about the developer. The Details page also includes an "Install" button that lets the user trigger the download/purchase of the application.

If you want to refer the user to a specific appplication, your application can take the user directly to the application's Details page. To do so, your application sends an ACTION_VIEW Intent that includes a URI and query parameter in this format:

market://details?id=<packagename>

In this case, the packagename parameter is target application's fully qualified package name, as declared in the package attribute of the manifest element in the application's manifest file. For example:

market://details?id=com.example.android.jetboy

Android Market URIs

The table below provides a list of URIs and actions currently supported by the Market application.

Note that these URIs work only when passed as Intent data — you can't currently load the URIs in a web browser, either on a desktop machine or on the device.

For this Result Pass this URI with the ACTION_VIEW Intent Comments
Display the Details screen for a specific application, as identified by the app's fully qualified package name. http://market.android.com/details?id=<packagename> or
market://details?id=<packagename>
Note that the package name that you specify is not specific to any version of an application. Therefore, Market always displays the Details page for the latest version of the application.
Search for an application by its fully qualified Java package name and display the result. http://market.android.com/search?q=pname:<package> or
market://search?q=pname:<package>
Searches only the Java package name of applications. Returns only exact matches.
Search for applications by developer name and display the results. http://market.android.com/search?q=pub:<Developer Name> or
market://search?q=pub:<Developer Name>
Searches only the "Developer Name" fields of Market public profiles. Returns exact matches only.
Search for applications by substring and display the results. http://market.android.com/search?q=<substring> or
market://search?q=<substring>
Searches all public fields (application title, developer name, and application description) for all applications. Returns exact and partial matches.
Search using multiple query parameters and display the results. Example:

http://market.android.com/search?q=world pname:com.android.hello pub:Android

Returns a list of applications meeting all the supplied parameters.
↑ Go to top