@@ -320,7 +320,8 @@ URI is:</p>
320320<p class="note"><strong>Note:</strong> If you create a link to open Google Play from your web
321321site and the user selects it from an Android-powered device, the device's Google Play application will
322322resolve the link so the user can use the Google Play application on the device instead of opening the web
323- site. As such, you should always use {@code http://play.google.com/store/...} URIs when creating a link on
323+ site. As such, you should always use {@code http://play.google.com/store/apps/...} URIs when
324+ creating a link on
324325a web page. When pointing to your apps from within your Android app, use the
325326{@code market://} URIs in an intent, so that the Google Play application always opens.</p>
326327
@@ -333,14 +334,16 @@ the application description, screenshots, reviews and more, and choose to instal
333334
334335<p>The format for the URI that opens the details page is:</p>
335336
336- <p style="margin-left:2em"><code><URI_prefix><b>details?id=</b><package_name></code></p>
337+ <p style="margin-left:2em"><code><URI_prefix><b>apps/ details?id=</b><package_name></code></p>
337338
338339<p>The <code><package_name></code> is a placeholder for the target application's
339340fully-qualified package name, as declared in the <a
340341href="{@docRoot}guide/topics/manifest/manifest-element.html#package">{@code
341342package}</a> attribute of the <a href="{@docRoot}guide/topics/manifest/manifest-element.html">{@code
342343<manifest>}</a> element.</p>
343344
345+ <p>For example: <code>http://play.google.com/store/apps/details?id=com.example.myapp</code></p>
346+
344347
345348<h4>Opening the app details page from your Android app</h4>
346349
@@ -355,12 +358,12 @@ Google Play:</p>
355358
356359<pre>
357360Intent intent = new Intent(Intent.ACTION_VIEW);
358- intent.setData(Uri.parse("market://details?id=com.android. example"));
361+ intent.setData(Uri.parse("market://details?id=com.example.android "));
359362startActivity(intent);
360363</pre>
361364
362365<p>This will open the Google Play application on the device to view the {@code
363- com.android. example} application.</p>
366+ com.example.android } application.</p>
364367
365368
366369<h4>Opening the app details page from a web site</h4>
@@ -369,17 +372,17 @@ com.android.example} application.</p>
369372format:</p>
370373
371374<p style="margin-left:2em">
372- <code>http://play.google.com/store/details?id=<package_name></code>
375+ <code>http://play.google.com/store/apps/ details?id=<package_name></code>
373376</p>
374377
375378<p>For example, here's a link that opens an application's details page on Google Play:</p>
376379
377380<pre>
378- <a href="http://play.google.com/store/details?id=com.android. example">App Link</a>
381+ <a href="http://play.google.com/store/apps/ details?id=com.example.android ">App Link</a>
379382</pre>
380383
381384<p>When clicked from a desktop web browser, this opens the Google Play web site to view the
382- {@code com.android. example} application. When clicked from an Android-powered device, users are
385+ {@code com.example.android } application. When clicked from an Android-powered device, users are
383386given the option to use either their web browser or the Google Play application to view the
384387application.</p>
385388
@@ -456,17 +459,16 @@ web browser or the Google Play application to perform the search.</p>
456459
457460<h3 id="BuildaButton">Build a Google Play button</h3>
458461
459- <p>Use the following form to generate a "Get it on Google Play" or "Android App
460- on Google Play" button that you can use on your web site. Input either your
461- application's package name or publisher name and the button will take users to
462- Google Play to either view your application's information or view a list of your
463- published apps. If users click the button while on an Android-powered device,
464- the Google Play application will respond to show users your application(s).</p>
462+ <p>Use the following form to create a button for your web site that takes users to your application
463+ on Google Play. Input either your application's package name or your publisher name and the button
464+ will take users to Google Play to either view your application's information or view a list of your
465+ published apps. If users click the button while on an Android-powered device, the Google Play
466+ application will respond to show users your application(s).</p>
465467
466- <p>This form offers four versions of the official brand badges at
467- recommended sizes. <!--If you want to create a different size, you can download an EPS file for
468- the button images from the <a href="http://www.android.com/branding.html">Android Brand
469- Guidelines</a>.</p>-- >
468+ <p>This form offers two styles of the official brand badge each at recommended sizes. You can pick
469+ between either "Get it on Google Play" or "Android app on Google Play." You should not modify the
470+ badge images in any way. For more usage guidelines,
471+ see the <a href="http://www.android.com/branding.html">Android Brand Guidelines</a>.</p>
470472
471473<style type="text/css">
472474
@@ -510,31 +512,42 @@ div.button-row input {
510512var imagePath = "http://www.android.com/images/brand/"
511513var linkStart = "<a href=\"http://play.google.com/store/";
512514var imageStart = "\">\n"
513- + " <img src=\"" + imagePath;
514- var imageEnd = ".png\"\n"
515- + " alt=\"Available on Google Play\" />\n</a>";
515+ + " <img alt=\"";
516+ // leaves opening for the alt text value
517+ var imageSrc = "\"\n src=\"" + imagePath;
518+ // leaves opening for the image file name
519+ var imageEnd = ".png\" />\n</a>";
516520
517521// variables for creating code snippet
518522var linkStartCode = "<a href=\"http://play.google.com/store/";
519523var imageStartCode = "\">\n"
520- + " <img src=\"" + imagePath;
521- var imageEndCode = ".png\"\n"
522- + " alt=\"Available on Google Play\" />\n</a>";
524+ + " <img alt=\"";
525+ // leaves opening for the alt text value
526+ var imageSrcCode = "\"\n src=\"" + imagePath;
527+ // leaves opening for the image file name
528+ var imageEndCode = ".png\" />\n</a>";
523529
524530/** Generate the HTML snippet and demo based on form values */
525531function buildButton(form) {
526- if (form["package"].value != "com.android.example") {
532+ var selectedValue = $('form input[type=radio]:checked').val();
533+ var altText = selectedValue.indexOf("get_it") != -1 ? "Get it on Google Play" : "Android app on Google Play";
534+
535+ if (form["package"].value != "com.example.android") {
527536 $("#preview").show();
528- $("#snippet").show().html(linkStartCode + "details?id=" + form["package"].value
529- + imageStartCode + $('form input[type=radio]:checked').val() + imageEndCode);
530- $("#button-preview").html(linkStart + "details?id=" + form["package"].value
531- + imageStart + $('form input[type=radio]:checked').val() + imageEnd);
537+ $("#snippet").show().html(linkStartCode + "apps/details?id=" + form["package"].value
538+ + imageStartCode + altText + imageSrcCode
539+ + selectedValue + imageEndCode);
540+ $("#button-preview").html(linkStart + "apps/details?id=" + form["package"].value
541+ + imageStart + altText + imageSrc
542+ + selectedValue + imageEnd);
532543 } else if (form["publisher"].value != "Example, Inc.") {
533544 $("#preview").show();
534545 $("#snippet").show().html(linkStartCode + "search?q=pub:" + form["publisher"].value
535- + imageStartCode + $('form input[type=radio]:checked').val() + imageEndCode);
536- $("#button-preview").html(linkStart + "search?q=pub:" + form["publisher"].value + imageStart +
537- $('form input[type=radio]:checked').val() + imageEnd);
546+ + imageStartCode + altText + imageSrcCode
547+ + selectedValue + imageEndCode);
548+ $("#button-preview").html(linkStart + "search?q=pub:" + form["publisher"].value
549+ + imageStart + altText + imageSrc
550+ + selectedValue + imageEnd);
538551 } else {
539552 alert("Please enter your package name or publisher name");
540553 }
@@ -598,13 +611,13 @@ $(document).ready(function() {
598611<form class="button-form">
599612 <label class="block" for="package">Package name:</label>
600613 <input class="text" type="text" id="package" name="package"
601- value="com.android. example"
602- default="com.android. example"
603- onfocus="onInputFocus(this, 'com.android. example')"
604- onblur="onInputBlur(this, 'com.android. example')"
614+ value="com.example.android "
615+ default="com.example.android "
616+ onfocus="onInputFocus(this, 'com.example.android ')"
617+ onblur="onInputBlur(this, 'com.example.android ')"
605618 onkeyup="return onTextEntered(event, this.parentNode, this)"/>
606619 <a id="package-clear" style="display:none" href="#"
607- onclick="return clearLabel('package','com.android. example');">clear</a>
620+ onclick="return clearLabel('package','com.example.android ');">clear</a>
608621 <p style="clear:both;margin:0"> <em>or</em></p>
609622 <label class="block" style="margin-top:5px" for="publisher">Publisher name:</label>
610623 <input class="text" type="text" id="publisher" name="publisher"
@@ -619,22 +632,22 @@ $(document).ready(function() {
619632
620633<div class="button-row">
621634 <input type="radio" name="buttonStyle" value="get_it_on_play_logo_small" id="ns" checked="checked" />
622- <label for="ns"><img src="http://www.android.com/images/brand/get_it_on_play_logo_small"
623- alt="narrow and small logo " /></label>
635+ <label for="ns"><img src="http://www.android.com/images/brand/get_it_on_play_logo_small.png "
636+ alt="Get it on Google Play (small) " /></label>
624637
625- <input type="radio" name="buttonStyle" value="get_it_on_play_logo_large.png " id="nm" />
638+ <input type="radio" name="buttonStyle" value="get_it_on_play_logo_large" id="nm" />
626639 <label for="nm"><img src="http://www.android.com/images/brand/get_it_on_play_logo_large.png"
627- alt="narrow and large logo " /></label>
640+ alt="Get it on Google Play (large) " /></label>
628641</div>
629642
630643<div class="button-row">
631- <input type="radio" name="buttonStyle" value="android_app_on_play_logo_small.png " id="ws" />
644+ <input type="radio" name="buttonStyle" value="android_app_on_play_logo_small" id="ws" />
632645 <label for="ws"><img src="http://www.android.com/images/brand/android_app_on_play_logo_small.png"
633- alt="wide and small logo " /></label>
646+ alt="Android app on Google Play (small) " /></label>
634647
635- <input type="radio" name="buttonStyle" value="android_app_on_play_logo_large.png " id="wm" />
648+ <input type="radio" name="buttonStyle" value="android_app_on_play_logo_large" id="wm" />
636649 <label for="wm"><img src="http://www.android.com/images/brand/android_app_on_play_logo_large.png"
637- alt="wide and large logo " /></label>
650+ alt="Android app on Google Play (large) " /></label>
638651</div>
639652
640653 <input type="button" onclick="return buildButton(this.parentNode)" value="Build my button"
@@ -644,7 +657,7 @@ style="padding:5px" />
644657
645658<div id="preview" style="display:none">
646659 <p>Copy and paste this HTML into your web site:</p>
647- <textarea id="snippet" cols="80 " rows="4 " onclick="this.select()"
660+ <textarea id="snippet" cols="100 " rows="5 " onclick="this.select()"
648661style="font-family:monospace;background-color:#efefef;padding:5px;display:none;margin-bottom:1em">
649662 </textarea >
650663
@@ -671,7 +684,7 @@ the web and in the Android application), as discussed in the previous sections.<
671684
672685<tr>
673686<td>Display the details screen for a specific application</td>
674- <td><code>http://play.google.com/store/details?id=<package_name></code>
687+ <td><code>http://play.google.com/store/apps/ details?id=<package_name></code>
675688<td><code>market://details?id=<package_name></code></td>
676689</tr>
677690
0 commit comments