Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Android Development
Previous Page Home Next Page

Publishing Your Applications

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:

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 upgrades, 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 Upgrades on Android Market

The beta version of Android Market does not support notifying your users when you publish a new version of your application. This capability will be added soon, but currently the user must independently initiate download of an upgraded application. When you publish an upgrade, you can assist users by notifying them that the upgrade is available and giving them a way to download the upgraded application from Android Market.

Here is a suggested way of tracking installed application versions and notifying users that an upgrade is available:

  1. Have your app occasionally check in with a web-service that you're running. This web service should return two values: the latest available version number for the application (corresponding to android:versionCode) and a URI string that your application can later send in an Intent, to launch Market and search for the upgraded application for the user.

    The URI that your web service returns should be properly formatted to search Android Market for your upgraded application. See Using Intents to Launch the Market Application for more information. The URI should specify the upgraded application's package name as the query parameter, since the package name is guaranteed to be unique on Android Market. The URI format for the package name search is:<package> or

  2. Your application can then compare its own version number against that retrieved. If the retrieved value is greater, your application can show a dialog informing the user that a new version is available. The dialog can offer buttons to begin the download or cancel.
  3. If the user clicks the button to begin the download, your application can call startActivity() using the ACTION_VIEW Intent, passing the URI received from your web service. The Intent launches the Market application on the device and initiates an immediate search on the Android Market site, based on the query parameters in the URI. When the result is displayed, the user can view the details of the upgraded application and begin the download.

    Note that, because the URI string is received from your web service and not hard-coded into your application, you can easily change the Market launch behaviors whenever needed, without having to change your application.

For more information about URIs you can pass to the Market application at launch, see Using Intents to Launch the Market Application, below.

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 upgrade 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 initiate a search for applications on Android Market, based on query parameters that you provide. For example, you can specify URIs to search for applications by:

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

Note that the URI queries return results from the public metadata supplied by developers in their Android Market profiles or application publishing information, but not from the developer's private account or from the certificate used to sign the application.

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

For this Result Pass this URI with the ACTION_VIEW Intent Comments
Search for an application by its fully qualified Java package name and display the result.<package> or
Searches only the Java package name of applications. Returns only exact matches.
Search for applications by developer name and display the results."<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.<substring> or
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: pub:Android

Returns a list of applications meeting all the supplied parameters.

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.

Android Development
Previous Page Home Next Page

  Published under the terms fo the Apache 2.0 License Design by Interspire