am 59450740: Merge change I0b0a4d6a into eclair-sdk
Merge commit '59450740c72c8642c25e2fa757754dc32252d1a2' into eclair * commit '59450740c72c8642c25e2fa757754dc32252d1a2': docs: update the publishing guide to revise the updating section
This commit is contained in:
@@ -18,7 +18,7 @@ page.title=Publishing Your Applications
|
|||||||
<ol>
|
<ol>
|
||||||
<li><a href="#overview">Publishing on Android Market</a>
|
<li><a href="#overview">Publishing on Android Market</a>
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="#marketupgrade">Publishing Upgrades on Android Market</a>
|
<li><a href="#marketupgrade">Publishing Updates on Android Market</a>
|
||||||
<li><a href="#marketintent">Using Intents to Launch the Market Application</a></li>
|
<li><a href="#marketintent">Using Intents to Launch the Market Application</a></li>
|
||||||
</ol></li>
|
</ol></li>
|
||||||
<!--
|
<!--
|
||||||
@@ -89,9 +89,11 @@ server when you upload the application.</p>
|
|||||||
<li>Your application must be signed with a cryptographic private key whose
|
<li>Your application must be signed with a cryptographic private key whose
|
||||||
validity period ends after <span style="color:red">22 October 2033</span>. </li>
|
validity period ends after <span style="color:red">22 October 2033</span>. </li>
|
||||||
<li>Your application must define both an <code>android:versionCode</code> and an
|
<li>Your application must define both an <code>android:versionCode</code> and an
|
||||||
<code>android:versionName</code> attribute in the <code><manifest></code>
|
<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. The server uses the <code>android:versionCode</code> as
|
||||||
the basis for identifying the application internally and handling upgrades, and
|
the basis for identifying the application internally and handling updates, and
|
||||||
it displays the <code>android:versionName</code> to users as the application's
|
it displays the <code>android:versionName</code> to users as the application's
|
||||||
version.</li>
|
version.</li>
|
||||||
<li>Your application must define both an <code>android:icon</code> and an
|
<li>Your application must define both an <code>android:icon</code> and an
|
||||||
@@ -100,58 +102,24 @@ element of its manifest.</li>
|
|||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 id="marketupgrade">Publishing Upgrades on Android Market</h3>
|
<h3 id="marketupgrade">Publishing Updates on Android Market</h3>
|
||||||
|
|
||||||
<p>The beta version of Android Market does not support notifying your users when
|
<p>At any time after publishing an application on Android Market, you can upload
|
||||||
you publish a new version of your application. This capability will be
|
and publish an update to the same application package. When you publish an
|
||||||
added soon, but currently the user must independently initiate download of an
|
update to an application, users who have already installed the
|
||||||
upgraded application. When you publish an upgrade, you can assist users by
|
application will automatically receive a notification that an update is
|
||||||
notifying them that the upgrade is available and giving them a way to download
|
available for the application. They can then choose to update the application
|
||||||
the upgraded application from Android Market.</p>
|
to the latest version.</p>
|
||||||
|
|
||||||
<p>Here is a suggested way of tracking installed application versions and
|
<p>Before uploading the updated application, be sure that you have incremented
|
||||||
notifying users that an upgrade is available:</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
|
||||||
|
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>
|
||||||
|
|
||||||
<ol>
|
|
||||||
<li>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
|
|
||||||
<code>android:versionCode</code>) 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.
|
|
||||||
|
|
||||||
<p>The URI that your web service returns should be properly formatted to
|
|
||||||
search Android Market for your upgraded application. See
|
|
||||||
<a href="#marketintent">Using Intents to Launch the Market Application</a>
|
|
||||||
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: </p>
|
|
||||||
|
|
||||||
<p><code>http://market.android.com/search?q=pname:<package></code> or
|
|
||||||
<br><code>market://search?q=pname:<package></code></p>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li>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. </li> <li>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.
|
|
||||||
|
|
||||||
<p>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. </p></li></ol>
|
|
||||||
|
|
||||||
<p>For more information about URIs you can pass to the Market application at
|
|
||||||
launch, see <a href="#marketintent">Using Intents to Launch the Market
|
|
||||||
Application</a>, below.</p>
|
|
||||||
|
|
||||||
<h3 id="marketintent">Using Intents to Launch the Market Application on
|
<h3 id="marketintent">Using Intents to Launch the Market Application on
|
||||||
a Device</h3>
|
a Device</h3>
|
||||||
@@ -163,7 +131,7 @@ download/install applications.</p>
|
|||||||
|
|
||||||
<p>You can launch the Market application from another Android
|
<p>You can launch the Market application from another Android
|
||||||
application by sending an Intent to the system. You might want to do
|
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
|
this, for example, to help the user locate and download an update to an
|
||||||
installed application, or to let the user know about related
|
installed application, or to let the user know about related
|
||||||
applications that are available for download. </p>
|
applications that are available for download. </p>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user