Publishing on Android Market

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. About Android Market
  2. Publishing Updates on Android Market
  3. Using Android Market Licensing Service
  4. Linking to Your Apps on Android Market
    1. Opening an app's details page
    2. Performing a search
    3. Build an Android Market button
    4. Summary of URI formats

See also

  1. Application Licensing
  2. Preparing to Publish

Interested in publishing your app on Android Market?

Go to Android Market to create a developer account and upload your application. For more information about the required assets, listing details, and options, see Uploading applications.

If you've followed the steps outlined in Preparing to Publish, the result of the process is a compiled .apk file that is signed with your private release key. Your application is now ready to be published publicly so users can install it.

You can publish your application and allow users to install it any way you choose, including from your own web server. This document provides information about publishing your Android application with Android Market.

About Android Market

Android Market is a service that makes it easy for users to find and download Android applications to their Android-powered devices, either from the Android Market application on their device or from the Android Market web site (market.android.com). As a developer, you can use Android Market to distribute your applications to users on all types of Android-powered devices, all around the world.

To publish your application on Android Market, you first need to register with the service using a Google account and agree to the terms of service. Once you are registered, you can upload your application to the service whenever you want, update it 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.

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

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 file. 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 file.

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 may 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 as the existing version and the .apk file 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, publish it as such, and will not offer it to existing users as an update.

Using Android Market Licensing Service

Android Market offers a licensing service that lets you enforce licensing policies for paid applications that you publish through Android Market. With Android Market Licensing, your applications can query Android Market at runtime to obtain the licensing status for the current user, then allow or disallow further use of the application as appropriate. Using the service, you can apply a flexible licensing policy on an application-by-application basis—each application can enforce its licensing status in the way most appropriate for it.

Any application that you publish through Android Market can use the Android Market Licensing Service. The service uses no dedicated framework APIs, so you can add licensing to any application that uses a minimum API Level of 3 or higher.

For complete information about Android Market Licensing Service and how to use it in your application, read Application Licensing.

Linking to Your Apps on Android Market

To help users discover your published applications, you can use two special Android Market URIs that direct users to your application's details page or perform a search for all of your published applications in Android Market. You can use these URIs to create a button in your application or a link on a web page that:

  • Opens your application's details page in the Android Market application or web site.
  • Searches for all your published applications in the Android Market application or web site.

You can launch the Android Market application or web site in the following ways:

  • Initiate an Intent from your application that launches the Android Market application on the user's device.
  • Provide a link on a web page that opens the Android Market web site (but will also open the Android Market application if clicked from a device).

In both cases, whether you want to initiate the action from your application or from a web page, the URIs are quite similar. The only difference is the URI prefix.

To open the Android Market application from your application, the prefix for the intent's data URI is:

market://

To open Android Market from your web site, the prefix for the link URI is:

http://market.android.com/

The following sections describe how to create a complete URI for each action.

Note: If you create a link to open Android Market from your web site and the user selects it from an Android-powered device, the device's Market application will resolve the link so the user can use the Market application instead of opening the web site. As such, you should always use http://market.android.com/ URIs when creating a link on a web page. When pointing to your apps from within your Android app, use the market:// URIs in an intent, so that the Market application always opens.

Opening an app's details page

As described above, you can open the details page for a specific application either on the Android Market application or the Android Market web site. The details page allows the user to see the application description, screenshots, reviews and more, and choose to install it.

The format for the URI that opens the details page is:

<URI_prefix>details?id=<package_name>

The <package_name> is a placeholder for the target application's fully-qualified package name, as declared in the package attribute of the <manifest> element.

Opening the app details page from your Android app

To open the Android Market details page from your application, create an intent with the ACTION_VIEW action and include a data URI in this format:

market://details?id=<package_name>

For example, here's how you can create an intent and open an application's details page in Android Market:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.android.example"));
startActivity(intent);

This will open the Android Market application on the device to view the com.android.example application.

Opening the app details page from a web site

To open the details page from your web site, create a link with a URI in this format:

http://market.android.com/details?id=<package_name>

For example, here's a link that opens an application's details page on Android Market:

<a href="http://market.android.com/details?id=com.android.example">App Link</a>

When clicked from a desktop web browser, this opens the Android Market web site to view the com.android.example application. When clicked from an Android-powered device, users are given the option to use either their web browser or the Android Market application to view the application.

Performing a search

To initiate a search in Android Market, the format for the URI is:

<URI_prefix>search?q=<query>

The <query> is a placeholder for the search query to execute in Android Market. The query can be a raw text string or you can include a parameter that performs a search based on the publisher name:

  • To perform a raw text search, append the query string:

    <URI_prefix>search?q=<search_query>

  • To search based on the publisher name, use the pub: parameter in the query, followed by the publisher name:

    <URI_prefix>search?q=pub:<publisher_name>

    You can use this type of search to show all of your published applications.

Searching from your Android app

To initiate a search on Android Market from your application, create an intent with the ACTION_VIEW action and include a data URI in this format:

market://search?q=<query>

The query may include the pub: parameter described above.

For example, here's how you can initiate a search in the Android Market application, based on the publisher name:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://search?q=pub:Your Publisher Name"));
startActivity(intent);

This opens the Android Market application to perform the search. The search result shows all applications published by the publisher that are compatible with the current device.

Searching from a web site

To initiate a search on Android Market from your web site, create a link with a URI in this format:

http://market.android.com/search?q=<query>

The query may include the pub: parameter described above.

For example, here's a link that initiates a search on Android Market, based on the publisher name:

<a href="http://market.android.com/search?q=pub:Your Publisher Name">Search Link</a>

When clicked from a desktop web browser, this opens the Android Market web site and performs the search. When clicked from an Android-powered device, users are given the option to use either their web browser or the Android Market application to perform the search.

Build an Android Market button

Use the following form to generate an "Available in Android Market" button that you can use on your web site. Input either your application's package name or publisher name and the button will take users to Android Market to either view your application's information or view a list of your published apps. If users click the button while on an Android-powered device, the Android Market application will respond to show users your application(s).

This form offers four versions of the official "Available in Android Market" button at recommended sizes. If you want to create a different size, you can download an EPS file for the button images from the Android Brand Guidelines.

 

 or

 

    
    

Summary of URI formats

The table below provides a summary of the URIs currently supported by the Android Market (both on the web and in the Android application), as discussed in the previous sections.

For this result Use this URI in a web page link Or this URI in an ACTION_VIEW intent
Display the details screen for a specific application http://market.android.com/details?id=<package_name> market://details?id=<package_name>
Search for applications using a general string query. http://market.android.com/search?q=<query> market://search?q=<query>
Search for applications by publisher name http://market.android.com/search?q=pub:<publisher_name> market://search?q=pub:<publisher_name>
↑ Go to top