diff options
| -rw-r--r-- | docs/html/guide/guide_toc.cs | 2 | ||||
| -rw-r--r-- | docs/html/guide/publishing/publishing.jd | 383 |
2 files changed, 215 insertions, 170 deletions
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs index b13600cc742c..c258949c2728 100644 --- a/docs/html/guide/guide_toc.cs +++ b/docs/html/guide/guide_toc.cs @@ -630,7 +630,7 @@ <span class="zh-TW" style="display:none">準備發佈</span> </a></li> <li><a href="<?cs var:toroot ?>guide/publishing/publishing.html"> - <span class="en">Publishing Your Applications</span> + <span class="en">Publishing on Android Market</span> </a></li> </ul> </li> diff --git a/docs/html/guide/publishing/publishing.jd b/docs/html/guide/publishing/publishing.jd index af1ea749f2e9..313d183a9211 100644 --- a/docs/html/guide/publishing/publishing.jd +++ b/docs/html/guide/publishing/publishing.jd @@ -1,4 +1,4 @@ -page.title=Publishing Your Applications +page.title=Publishing on Android Market @jd:body <div id="qv-wrapper"> @@ -16,22 +16,22 @@ page.title=Publishing Your Applications <h2>In this document</h2> <ol> -<li><a href="#overview">Publishing on Android Market</a> - <ol> - <li><a href="#marketupgrade">Publishing Updates on Android Market</a></li> - <li><a href="#marketLicensing">Using Android Market Licensing Service</a></li> - <li><a href="#marketintent">Using Intents to Launch the Market Application</a></li> - </ol></li> -<!-- -<li><span style="color:ccc">Publishing on Other Hosted Services</a></li> -<li><span style="color:ccc">Publishing through a Web Server</a></li> ---> +<li><a href="#overview">About Android Market</a> +<li><a href="#marketupgrade">Publishing Updates on Android Market</a></li> +<li><a href="#marketLicensing">Using Android Market Licensing Service</a></li> +<li><a href="#marketintent">Opening Android Market to View an App or Perform a Search</a> + <ol> + <li><a href="#OpeningDetails">Linking to Your Apps on Android Market</a></li> + <li><a href="#PerformingSearch">Performing a search</a></li> + <li><a href="#UriSummary">Summary of URI formats</a></li> + </ol> +</li> </ol> <h2>See also</h2> <ol> -<li><a href="{@docRoot}guide/publishing/licensing.html">Licensing Your Applications</a></li> +<li><a href="{@docRoot}guide/publishing/licensing.html">Application Licensing</a></li> <li><a href="{@docRoot}guide/publishing/preparing.html">Preparing to Publish</a></li> </ol> @@ -39,43 +39,45 @@ page.title=Publishing Your Applications <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png"> <div id="qv-sub-rule"> <img src="{@docRoot}assets/images/icon_market.jpg" style="float:left;margin:0;padding:0;"> - <p style="color:#669999;">Interested in publishing your app on Android Market?</p> - <a id="publish-link" href="http://market.android.com/publish">Go to Android Market »</a> + <h2 style="color:#669999;">Interested in publishing your app on Android Market?</h2> + <p><a href="http://market.android.com/publish">Go to Android Market</a> to +create a developer account and upload your application. For more information about the +required assets, listing details, and options, see <a +href="http://market.android.com/support/bin/answer.py?answer=113469">Uploading +applications</a>.</p> </div> </div> </div> </div> -<p>Publishing an application means testing it, packaging it appropriately, and making -it available to users of Android-powered mobile devices for download or sideload.</p> +<p>If you've followed the steps outlined in <a +href="{@docRoot}guide/publishing/preparing.html">Preparing to Publish</a>, the result of the process +is a compiled {@code .apk} file that is signed with your private release key. Your application is +now ready to be published publicly so users can install it.</p> -<p>If you've followed the steps outlined in -<a href="{@docRoot}guide/publishing/preparing.html">Preparing to -Publish Your Applications</a>, 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. </p> +<p>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.</p> -<p>The sections below provide information about publishing your Android -application to mobile device users.</p> -<h2 id="overview">Publishing on Android Market</h2> +<h2 id="overview">About Android Market</h2> -<p>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.</p> +<p>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 (<a +href="http://market.android.com">market.android.com</a>). 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.</p> <p>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. +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, 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. </p> +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. </p> <p>To register as an Android Market developer and get started with publishing, -visit the Android Market: </p> +visit the Android Market publisher site: </p> <p style="margin-left:3em;"><a href="http://market.android.com/publish">http://market.android.com/publish</a> @@ -94,22 +96,24 @@ validity period ends after <span style="color:red">22 October 2033</span>. </li> <code>android:versionName</code> attribute in the <a href="{@docRoot}guide/topics/manifest/manifest-element.html"><code><manifest></code></a> -element of its manifest. The server uses the <code>android:versionCode</code> as +element of its manifest file. The server uses the <code>android:versionCode</code> as the basis for identifying the application internally and handling updates, and it displays the <code>android:versionName</code> to users as the application's version.</li> <li>Your application must define both an <code>android:icon</code> and an -<code>android:label</code> attribute in the <code><application></code> -element of its manifest.</li> +<code>android:label</code> attribute in the <a +href="{@docRoot}guide/topics/manifest/application-element.html"><code><application></code></a> +element of its manifest file.</li> </ol> </div> -<h3 id="marketupgrade">Publishing Updates on Android Market</h3> + +<h2 id="marketupgrade">Publishing Updates on Android Market</h2> <p>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 +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.</p> @@ -117,190 +121,231 @@ to the latest version.</p> the <code>android:versionCode</code> and <code>android:versionName</code> attributes in the <a href="{@docRoot}guide/topics/manifest/manifest-element.html"><code><manifest></code></a> -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 +element of the manifest file. Also, the package name must be the same as the existing version and +the {@code .apk} file must be signed with the same private key. If the package name and signing certificate do <em>not</em> match those of the existing version, Market will -consider it a new application and will not offer it to users as an update.</p> +consider it a new application, publish it as such, and will not offer it to existing users as an +update.</p> -<h3 id="marketLicensing">Using Android Market Licensing Service</h3> +<h2 id="marketLicensing">Using Android Market Licensing Service</h2> <p>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 run time -to obtain their licensing status for the current user, then allow or disallow -further use as appropriate. Using the service, you can apply a flexible -licensing policy on an application-by-application basis — each +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. </p> <p>Any application that you publish through Android Market can use the Android -Market Licensing Service. The service uses no dedicated framework APIs, you can -add licensing to any legacy application that uses a minimum API level of 3 or +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.</p> <p>For complete information about Android Market Licensing Service and how to -use it in your application, see <a -href="{@docRoot}guide/publishing/licensing.html">Licensing Your -Applications</a>.</p> +use it in your application, read <a +href="{@docRoot}guide/publishing/licensing.html">Application Licensing</a>.</p> -<h3 id="marketintent">Using Intents to Launch the Market Application on -a Device</h3> -<p>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.</p> +<h2 id="marketintent">Linking to Your Apps on Android Market</h2> -<p>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. </p> +<p>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 do the following:</p> -<p>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.</p> - -<p>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:</p> +<ul> + <li>Create a button in your application or a link on a web page that opens one of your +application's details page in the Android Market application or web site.</li> + <li>Create a button in your application or a link on a web page that searches for all your +published applications in the Android Market application or web site.</li> +</ul> +<p>You can launch the Android Market application or web site in the following ways:</p> <ul> -<li>Initiate a search for applications on Android Market, based on the query -parameters that you provide, or </li> -<li>Load the Details page for a specific application on Android Market, based on -the application's package name.</li> + <li>Initiate an {@link android.content.Intent} from your application that launches the +Android Market application on the user's device. The intent must use the {@link +android.content.Intent#ACTION_VIEW} action, and include intent data with the appropriate +Android Market URI scheme.</li> + <li>Provide a hyperlink on a web page that opens the Android Market web site.</li> </ul> -<h4>Initiating a search</h4> +<p>In both cases, you need to create a URI that indicates either the application you'd like to view +in Android Market or the search you'd like to perform. The URI is quite similar whether you want +to open the application or open the web site. The only difference is the URI prefix.</p> + +<p>To open the Android Market application on the device, the prefix for the intent's data URI +is:</p> + +<p style="margin-left:2em"><code>market://</code></p> + +<p>To open the Android Market web site, the prefix for the link URI is:</p> + +<p style="margin-left:2em"><code>http://market.android.com/</code></p> + +<p>To complete each URI, you must append a string that specifies either the +application for which you want to view or the search to execute. The following sections +describe how to create a complete URI for each case.</p> + +<p class="note"><strong>Note:</strong> If you create a link to open the Android Market web site and +the user selects it from an Android-powered device, the Android Market application will also resolve +the link so the user can use the native application instead of the web site. Also, because the +Android Market application also reads the {@code http://} URIs, you can also use them in an intent, +but you should usually use the {@code market://} URIs for an intent, so that the native application +is opened by default. You should use {@code http://} URIs only when creating links from a web +page.</p> + + +<h3 id="OpeningDetails">Opening an app's details page</h3> -<p>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 +<p>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.</p> + +<p>The format for the URI that opens the details page is:</p> + +<p style="margin-left:2em"><code><URI_prefix><b>details?id=</b><package_name></code></p> + +<p>The <code><package_name></code> is a placeholder for the target application's fully +qualified package name, as declared in the <a +href="{@docRoot}guide/topics/manifest/manifest-element.html#package">{@code +package}</a> attribute of the <a href="{@docRoot}guide/topics/manifest/manifest-element.html">{@code +<manifest>}</a> element in the application's manifest file.</p> + + +<h4>Opening details in the Android Market application</h4> + +<p>To open the details page in the Android Market application, create an intent with the +{@link android.content.Intent#ACTION_VIEW} action and include a data URI in this format:</p> + +<p style="margin-left:2em"><code>market://details?id=<package_name></code></p> + +<p>For example, here's how you can create an intent and open an application's details page in the +Android Market application:</p> + +<pre> +Intent intent = new Intent(Intent.ACTION_VIEW); +intent.setData(Uri.parse("market://details?id=com.android.example")); +startActivity(intent); +</pre> + + +<h4>Opening details on the Android Market web site</h4> + +<p>To open the details page on the Android Market web site, create a link with a URI in this format:</p> -<p style="margin-left:2em"><code>market://search?q=<paramtype>:<value></code></p> - -<div class="sidebox-wrapper" xstyle="margin-bottom:2em;margin-top:.5em;width:90%;"> - <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png"> - <div id="qv-sub-rule"> - <img src="{@docRoot}assets/images/icon_market.jpg" style="float:left;margin:0;padding:0;"> - <p style="color:#669999;">Searches on Android Market</p> -<p>When you initiate a search, Android Market returns results from matches in -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. </p> - </div> -</div> +<p style="margin-left:2em"> + <code>http://market.android.com/details?id=<package_name></code> +</p> + +<p>For example, here's a link that opens an application's details page on the Android Market web +site:</p> + +<pre> +<a href="http://market.android.com/details?id=com.android.example">App Link</a> +</pre> + -<p>Using this URI format, you can search for applications by:</p> + +<h3 id="PerformingSearch">Performing a search</h3> + +<p>To initiate a search in Android Market, the format for the URI is:</p> + +<p style="margin-left:2em"> + <code><URI_prefix><b>search?q=</b><query></code> +</p> + +<p>The <code><query></code> is a placeholder for the search query to execute in Android +Market. The query can be a raw text string or you can include parameters that perform a search +based on the publisher name or application package name:</p> <ul> -<li>Package name</li> -<li>Developer name</li> -<li>String match across application name, developer name, and -description, or </li> -<li>Any combination of the above</li> + <li>To search based on the publisher name, use the {@code pub:} parameter: + <p><code><URI_prefix><b>search?q=pub:</b><publisher_name></code></p> + <p>You can use this type of search to show all of your published applications.</p></li> + + <li>To search based on the package name, use the {@code pname:} parameter: + <p><code><URI_prefix><b>search?q=pname:</b><package_name></code></p></li> </ul> -<p>The table at the bottom of this page specifies the <code>paramtypes</code> -and <code>values</code> that correspond to each of these types of search. </p> -<p>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: </p> +<h4>Searching the Android Market application</h4> -<ol> -<li>The user presses a link or button in your application.</li> -<li>The Market application launches and takes control of the screen, displaying -a progress indicator labeled "Searching" until it receives the search -results.</li> -<li>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. -</li> -<li>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.</li> -</ol> +<p>To perform a search in the Android Market application, create an intent with the +{@link android.content.Intent#ACTION_VIEW} action and include a data URI in this format:</p> -<h4>Loading an application's Details page</h4> +<p style="margin-left:2em"><code>market://search?q=<query></code></p> -<p>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.</p> +<p>The query may include the {@code pub:} or {@code pname:} parameters described above.</p> -<p>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:</p> +<p>For example, here's how you can initiate a search in the Android Market application, based on the +publisher name:</p> -<p style="margin-left:2em"><code>market://details?id=<packagename></code></p> +<pre> +Intent intent = new Intent(Intent.ACTION_VIEW); +intent.setData(Uri.parse("market://search?q=pub:Your Publisher Name")); +startActivity(intent); +</pre> -<p>In this case, the <code>packagename</code> parameter is target application's -fully qualified package name, as declared in the <code>package</code> attribute -of the <code>manifest</code> element in the application's manifest file. For example:</p> -<p style="margin-left:2em"><code>market://details?id=com.example.android.jetboy</code></p> +<h4>Searching the Android Market web site</h4> + +<p>To perform a search on the Android Market web site, create a link with a URI in this +format:</p> + +<p style="margin-left:2em"> + <code>http://market.android.com/search?q=<query></code> +</p> + +<p>The query may include the {@code pub:} or {@code pname:} parameters described above.</p> + +<p>For example, here's a link that initiates a search on the Android Market web site, based on the +publisher name:</p> + +<pre> +<a href="http://market.android.com/search?q=pub:Your Publisher Name">Search Link</a> +</pre> -<h4>Android Market URIs</h4> -<p>The table below provides a list of URIs and actions currently -supported by the Market application.</p> -<p>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. </p> +<h3 id="UriSummary">Summary of URI formats</h3> + +<p>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.</p> <table> <tr> -<th width="25%">For this Result</th> -<th>Pass this URI with the ACTION_VIEW Intent</th> -<th width="36%">Comments</th> -</tr> -<tr> -<td>Display the Details screen for a specific application, as identified -by the app's fully qualified package name.</td> -<td><code>http://market.android.com/details?id=<packagename></code> -or<br> -<code>market://details?id=<packagename></code></td> -<td>Note that the package name that you specify is <em>not</em> specific to any -version of an application. Therefore, Market always displays the Details page for the -latest version of the application.</td> +<th>For this result</th> +<th>Use this URI in a web page link</th> +<th>Or this URI in an {@link android.content.Intent#ACTION_VIEW} intent</th> </tr> + <tr> -<td>Search for an application by its fully qualified Java package name and -display the result.</td> -<td><code>http://market.android.com/search?q=pname:<package></code> or<br> -<code>market://search?q=pname:<package></code></td> -<td>Searches only the Java package name of applications. Returns only exact -matches.</td> +<td>Display the details screen for a specific application</td> +<td><code>http://market.android.com/details?id=<package_name></code> +<td><code>market://details?id=<package_name></code></td> </tr> <tr> -<td>Search for applications by developer name and display the results.</td> -<td><code>http://market.android.com/search?q=pub:<Developer Name></code> -or<br> <code>market://search?q=pub:<Developer Name></code></td> -<td>Searches only the "Developer Name" fields of Market public profiles. -Returns exact matches only. </td> +<td>Search for applications using a general string query.</td> +<td><code>http://market.android.com/search?q=<query></code></td> +<td><code>market://search?q=<query></code></td> </tr> <tr> -<td>Search for applications by substring and display the results.</td> -<td><code>http://market.android.com/search?q=<substring></code> or -<br><code>market://search?q=<substring></code></td> -<td>Searches all public fields (application title, developer name, and -application description) for all applications. Returns exact and partial -matches.</td> +<td>Search for applications by publisher name</td> +<td><nobr><code>http://market.android.com/search?q=pub:<publisher_name></code></nobr></td> +<td><nobr><code>market://search?q=pub:<publisher_name></code></nobr></td> </tr> <tr> -<td>Search using multiple query parameters and display the results.</td> -<td>Example:<p><code>http://market.android.com/search?q=world pname:com.android.hello pub:Android</code></p></td> -<td>Returns a list of applications meeting all the supplied parameters. </td> +<td>Search for an application by its fully qualified package name</td> +<td><code>http://market.android.com/search?q=pname:<package_name></code></td> +<td><code>market://search?q=pname:<package_name></code></td> </tr> + </table> + |