Home | History | Annotate | Download | only in promote
      1 page.title=Linking to Your Products
      2 @jd:body
      3 <div id="butterbar-wrapper" >
      4   <div id="butterbar" >
      5     <div id="butterbar-message">
      6 <a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
      7       Take the Android Developer Survey</a>
      8     </div>
      9   </div>
     10 </div>
     11 
     12 <div class="sidebox-wrapper">
     13 <div class="sidebox">
     14 <a href="badges.html">
     15   <img alt="Get it on Google Play"
     16        src="{@docRoot}images/brand/en_app_rgb_wo_45.png" />
     17 </a>
     18 <p>For a link that includes the Google Play brand icon, check out the <a href="badges.html">Badges</a> page. </p>
     19 </div>
     20 </div>
     21 
     22 <p>Google Play provides several link formats that let you bring users to your
     23 products in the way you want, from Android apps, web pages, ads, reviews,
     24 articles, social media posts, and more.</p> 
     25 
     26 <p>The link formats let you:</p>
     27 <ul>
     28 <li>Link to a specific app's <a href="#OpeningDetails">product details page</a></li>
     29 <li>Link to a <a href="#OpeningPublisher">list of all of your apps</a>, or</li>
     30 <li>Link to a <a href="#PerformingSearch">search result</a> of your choice</li>
     31 <li>Link to a <a href="#OpeningCollection">collection</a> on Google Play</li>
     32 </ul>
     33 
     34 <p>If you are linking from an Android app, you can also control whether the link
     35 launches the Play Store application or the browser, which takes the user
     36 to the Google Play web site.</p>
     37 
     38 <h2 id="OpeningDetails">Linking to a Product Details Page</h2>
     39 
     40 <p>Use the format below to deep-link users directly to a specific app's product
     41 details page. At the product details page, users can see the app description,
     42 screenshots, reviews and more, and then install it.</p>
     43 
     44 <p>To create the link, you need to know the app's fully qualified <em>package
     45 name</em>, which is declared in the app's <a
     46 href="{@docRoot}guide/topics/manifest/manifest-element.html#package">manifest
     47 file</a>. The package name is also visible in the Developer Console. </p>
     48 
     49 <dl>
     50 <dt><strong>From a web site:</strong></dt>
     51 <dd>
     52 <pre>http://play.google.com/store/apps/details?id=<package_name>;</pre>
     53 </dd>
     54 <dt><strong>From an Android app:</strong></dt>
     55 <dd>
     56 <pre>market://details?id=&lt;package_name&gt;</pre>
     57 </dd>
     58 </dl>
     59 
     60 <p>Here's an example:</p>
     61 
     62 <p style="margin-left:1em;"><code><a href="http://play.google.com/store/apps/details?id=com.google.android.apps.maps">http://play.google.com/store/apps/details?id=com.google.android.apps.maps</a></code></p>
     63 
     64 <p>For details on how to send the link in an Android app, see <a href="#android-app">Linking from an Android App</a>.</p>
     65 
     66 
     67 
     68 <h2 id="OpeningPublisher">Linking to a Product List</h2>
     69 
     70 <p>Use the format below to link users to a list of apps published by you. The
     71 product list lets users see all of the apps from a specific publisher, with
     72 ratings, editorial badges, and an Install button for each. </p>
     73 
     74 <p>To create the link, you need to know your <em>publisher name</em>, which is
     75 available from the Developer Console. </p>
     76 
     77 <dl>
     78 <dt><strong>From a web site:</strong></dt>
     79 <dd>
     80 <pre>http://play.google.com/store/search?q=pub:<publisher_name>;</pre>
     81 </dd>
     82 <dt><strong>From an Android app:</strong></dt>
     83 <dd>
     84 <pre>market://search?q=pub:&lt;publisher_name&gt;</pre>
     85 </dd>
     86 </dl>
     87 
     88 <p>Here's an example:</p>
     89 
     90 <p style="margin-left:1em;"><code><a href="http://play.google.com/store/search?q=pub:Google Inc.">http://play.google.com/store/search?q=pub:Google Inc.</a></code></p>
     91 
     92 <p>For details on how to send the link in an Android app, see <a href="#android-app">Linking from an Android App</a>.</p>
     93 
     94 
     95 <h2 id="PerformingSearch">Linking to a Search Result</h2>
     96 
     97 <p>Use the format below to link users to a search query result on Google Play.
     98 The search result page shows a list of apps (and optionally other content) that
     99 match the query, with ratings, badges, and an Install button for each. </p>
    100 
    101 <p>To create the link, you just need a search query string. If you want the
    102 query to search outside of the Google Play Apps listings, you can remove the
    103 <code>&c=apps</code> part of the link URL.</p>
    104 
    105 <dl>
    106 <dt><strong>From a web site:</strong></dt>
    107 <dd>
    108 <pre>http://play.google.com/store/search?q=<search_query>&c=apps</pre>
    109 </dd>
    110 <dt><strong>From an Android app:</strong></dt>
    111 <dd>
    112 <pre>market://search?q=&lt;seach_query&gt;&c=apps</pre>
    113 </dd>
    114 </dl>
    115 
    116 <p>Here's an example:</p>
    117 
    118 <p style="margin-left:1em;"><code><a href="http://play.google.com/store/search?q=maps&c=apps">http://play.google.com/store/search?q=maps&c=apps</a></code></p>
    119 
    120 <p>For details on how to send the link in an Android app, see <a href="#android-app">Linking from an Android App</a>.</p>
    121 
    122 
    123 
    124 <h2 id="OpeningCollection">Linking to a Collection</h2>
    125 
    126 <p>If your app is featured or appears in one of the Google Play Top charts or
    127 collections, you can use the format below to link users directly to the
    128 collection. The collection shows a ranked list of apps in the collection, with
    129 ratings, short descriptions, and an Install button.</p>
    130 
    131 <dl>
    132 <dt><strong>From a web site:</strong></dt>
    133 <dd>
    134 <pre>http://play.google.com/store/apps/collection/<collection_name>;</pre>
    135 </dd>
    136 <dt><strong>From an Android app:</strong></dt>
    137 <dd>
    138 <pre>market://apps/collection/&lt;collection_name&gt;</pre>
    139 </dd>
    140 </dl>
    141 
    142 <p>Here's an example:</p>
    143 
    144 <p style="margin-left:1em;"><code><a href="http://play.google.com/store/apps/collection/editors_choice">http://play.google.com/store/apps/collection/editors_choice</a></code></p>
    145 
    146 <p>For details on how to send the link in an Android app, see <a href="#android-app">Linking from an Android App</a>.</p>
    147 
    148 <p class="table-caption"><strong>Table 1.</strong> Collections on Google Play</a>.</p>
    149 
    150 <table>
    151 <tr>
    152 <th>Collection</th><th>collection_name</th>
    153 </tr>
    154 <tr><td>Staff Picks (Featured)</td><td>featured</td></tr>
    155 <tr><td>Editor's Choice</td><td>editors_choice</td></tr>
    156 <tr><td>Top Paid</td><td>topselling_paid</td></tr>
    157 <tr><td>Top Free</td><td>topselling_free</td></tr>
    158 <tr><td>Top New Free</td><td>topselling_new_free</td></tr>
    159 <tr><td>Top New Paid</td><td>topselling_new_paid</td></tr>
    160 <tr><td>Top Grossing</td><td>topgrossing</td></tr>
    161 <tr><td>Trending</td><td>movers_shakers</td></tr>
    162 <tr><td>Best Selling in Games</td><td>topselling_paid_game</td></tr>
    163 </table>
    164 
    165 
    166 <h2 id="android-app">Linking from an Android App</h2>
    167 
    168 <p>There are two general formats for links that are accessible to users on
    169 Android devices, The two formats trigger slightly different behaviors on the
    170 device:</p>
    171 
    172 <ul>
    173 <li><code>market://</code> &nbsp;&nbsp; Launches the Play Store app to load the
    174 target page.</li>
    175 <li><code>http://</code> &nbsp;&nbsp; Lets the user choose whether to launch the
    176 Play Store app or the browser to handle the request. If the browser handles the
    177 request, it loads the target page on the Google Play web site.</li>
    178 </ul>
    179 
    180 <p>In general, you should use <code>http://</code> format for links on web pages
    181 and <code>market://</code> for links in Android apps.</p>
    182 
    183 <p>If you want to link to your products from an Android app, create an {@link
    184 android.content.Intent} that opens an Google Play URL, as shown in the example
    185 below.</p>
    186 
    187 <pre>
    188 Intent intent = new Intent(Intent.ACTION_VIEW);
    189 intent.setData(Uri.parse("market://details?id=com.example.android"));
    190 startActivity(intent);
    191 </pre>
    192 
    193 
    194 <h2 id="UriSummary">Summary of URL formats</h2>
    195 
    196 <p>The table below provides a summary of the URIs currently supported by the Google Play (both on
    197 the web and in an Android application), as discussed in the previous sections.</p>
    198 
    199 <table>
    200 <tr>
    201 <th>For&nbsp;this&nbsp;result</th>
    202 <th>Web page link</th>
    203 <th>Android app link</th>
    204 </tr>
    205 <tr>
    206 <td style="width:72px;">Show the product details page for a specific app</td>
    207 <td><code>http://play.google.com/store/apps/details?id=<package_name>;</code>
    208 <td><code>market://details?id=&lt;package_name&gt;</code></td>
    209 </tr>
    210 <tr>
    211 <td>Show apps by a specific publisher</td>
    212 <td><nobr><code>http://play.google.com/store/search?q=pub:<publisher_name>;</code></nobr></td>
    213 <td><nobr><code>market://search?q=pub:&lt;publisher_name&gt;</code></nobr></td>
    214 </tr>
    215 <tr>
    216 <td>Search for apps using a general string query.</td>
    217 <td><code>http://play.google.com/store/search?q=<query>;</code></td>
    218 <td><code>market://search?q=&lt;query&gt;</code></td>
    219 </tr>
    220 </table>
    221 
    222