diff options
Diffstat (limited to 'docs/html/distribute/tools/promote')
61 files changed, 1763 insertions, 0 deletions
diff --git a/docs/html/distribute/tools/promote/badge-files.jd b/docs/html/distribute/tools/promote/badge-files.jd new file mode 100644 index 0000000..cce3632 --- /dev/null +++ b/docs/html/distribute/tools/promote/badge-files.jd @@ -0,0 +1,291 @@ +page.title=Google Play Badge Files +page.image=/images/gp-badges-set.png +page.metaDescription=Download hi-res assets for localized Google Play badges. +page.tags="badge, google play" + +@jd:body + +<style> +table tr td {border:0} +</style> + +<p>The following links provide the Adobe® Illustrator® (.ai) file for the +two Google Play badges.</p> + +<hr> +<img src="{@docRoot}images/brand/en_generic_rgb_wo_60.png" alt="Get It On Google Play"> + +<div style="clear:left"> </div> + +<div class="col-4" style="margin-left:0"> + + <a href="{@docRoot}downloads/brand/v2/english_get.ai">English (English)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/amharic_get.ai">ኣማርኛ (Amharic)</a><br/> + + <a href="{@docRoot}downloads/brand/af_generic_rgb_wo.ai">Afrikaans (Afrikaans)</a><br/> +<!-- + <a href="{@docRoot}downloads/brand/ar_generic_rgb_wo.ai">العربية (Arabic)</a><br/> +--> + <a href="{@docRoot}downloads/brand/v2/belarusian_get.ai">Беларуская (Belarusian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/bulgarian_get.ai">български (Bulgarian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/catalan_get.ai">Català (Catalan)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/traditional_chinese_get.ai">中文 (中国) (Chinese)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/hongkong_chinese_get.ai">中文(香港) (Chinese Hong Kong)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/taiwan_chinese_get.ai">中文 (台灣) (Chinese Taiwan)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/croatian_get.ai">Hrvatski (Croatian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/czech_get.ai">Česky (Czech)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/danish_get.ai">Dansk (Danish)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/dutch_get.ai">Nederlands (Dutch)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/estonian_get.ai">Eesti keel (Estonian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/farsi_get.ai">فارسی (Farsi Persian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/filipino_get.ai">Tagalog (Filipino)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/finnish_get.ai">Suomi (Finnish)</a><br/> + +</div> + +<div class="col-4"> + + <a href="{@docRoot}downloads/brand/v2/french_get.ai">Français (French)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/german_get.ai">Deutsch (German)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/greek_get.ai">Ελληνικά (Greek)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/hebrew_get.ai">עברית (Hebrew)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/hindi_get.ai">हिन्दी (Hindi)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/hungarian_get.ai">Magyar (Hungarian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/indonesian_get.ai">Bahasa Indonesia (Indonesian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/italian_get.ai">Italiano (Italian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/japanese_get.ai">日本語 (Japanese)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/kazakh_get.ai">Қазақ тілі (Kazakh)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/korean_get.ai">한국어 (Korean)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/latvian_get.ai">Latviski (Latvian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/lithuanian_get.ai">Lietuviškai (Lithuanian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/malay_get.ai">Bahasa Melayu (Malay)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/norwegian_get.ai">Norsk (Norwegian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/polish_get.ai">Polski (Polish)</a><br/> + +</div> + +<div class="col-4" style="margin-right:0"> + + <a href="{@docRoot}downloads/brand/v2/portugal_portuguese_get.ai">Português (Portuguese)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/brazilian_portuguese_get.ai">Português Brasil (Portuguese Brazil)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/romanian_get.ai">Românã (Romanian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/russian_get.ai">Pусский (Russian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/serbian_get.ai">Српски / srpski (Serbian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/slovak_get.ai">Slovenčina (Slovak)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/slovenian_get.ai">Slovenščina (Slovenian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/spanish_get.ai">Español (Spanish)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/spanish_latam_get.ai">Español Latinoamérica (Spanish Latin America)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/swahili_get.ai">Kiswahili (Swahili)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/swedish_get.ai">Svenska (Swedish)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/thai_get.ai">ภาษาไทย (Thai)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/turkish_get.ai">Türkçe (Turkish)</a><br/> + + <a href="{@docRoot}downloads/brand/uk_generic_rgb_wo.ai">Українська (Ukrainian)</a><br/> + <a href="{@docRoot}downloads/brand/vi_generic_rgb_wo.ai">Tiếng Việt (Vietnamese)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/zulu_get.ai">isiZulu (Zulu)</a><br/> + +</div> +<div style="clear:left"> </div> + + + + + + + + + +<hr> +<img src="{@docRoot}images/brand/en_app_rgb_wo_60.png" alt="Android App On Google Play"> + +<div style="clear:left"> </div> + +<div class="col-4" style="margin-left:0"> + + <a href="{@docRoot}downloads/brand/v2/english_app.ai">English (English)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/afrikaans_app.ai">Afrikaans (Afrikaans)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/amharic_app.ai">ኣማርኛ (Amharic)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/arabic_app.ai">العربية (Arabic)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/belarusian_app.ai">Беларуская (Belarusian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/bulgarian_app.ai">български (Bulgarian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/catalan_app.ai">Català (Catalan)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/traditional_chinese_app.ai">中文 (中国) (Chinese)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/hongkong_chinese_app.ai">中文(香港) (Chinese Hong Kong)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/taiwan_chinese_app.ai">中文 (台灣) (Chinese Taiwan)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/croatian_app.ai">Hrvatski (Croatian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/czech_app.ai">Česky (Czech)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/danish_app.ai">Dansk (Danish)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/dutch_app.ai">Nederlands (Dutch)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/estonian_app.ai">Eesti keel (Estonian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/farsi_app.ai">فارسی (Farsi Persian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/filipino_app.ai">Tagalog (Filipino)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/finnish_app.ai">Suomi (Finnish)</a><br/> + +</div> + +<div class="col-4"> + + <a href="{@docRoot}downloads/brand/v2/french_app.ai">Français (French)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/german_app.ai">Deutsch (German)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/greek_app.ai">Ελληνικά (Greek)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/hebrew_app.ai">עברית (Hebrew)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/hindi_app.ai">हिन्दी (Hindi)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/hungarian_app.ai">Magyar (Hungarian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/indonesian_app.ai">Bahasa Indonesia (Indonesian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/italian_app.ai">Italiano (Italian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/japanese_app.ai">日本語 (Japanese)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/korean_app.ai">한국어 (Korean)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/latvian_app.ai">Latviski (Latvian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/lithuanian_app.ai">Lietuviškai (Lithuanian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/malay_app.ai">Bahasa Melayu (Malay)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/norwegian_app.ai">Norsk (Norwegian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/polish_app.ai">Polski (Polish)</a><br/> + + +</div> + +<div class="col-4" style="margin-right:0"> + + <a href="{@docRoot}downloads/brand/v2/portugal_portuguese_app.ai">Português (Portuguese)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/brazilian_portuguese_app.ai">Português Brasil (Portuguese Brazil)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/romanian_app.ai">Românã (Romanian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/russian_app.ai">Pусский (Russian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/serbian_app.ai">Српски / srpski (Serbian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/slovak_app.ai">Slovenčina (Slovak)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/slovenian_app.ai">Slovenščina (Slovenian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/spanish_app.ai">Español (Spanish)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/spanish_latam_app.ai">Español Latinoamérica (Spanish Latin America)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/swahili_app.ai">Kiswahili (Swahili)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/swedish_app.ai">Svenska (Swedish)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/thai_app.ai">ภาษาไทย (Thai)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/turkish_app.ai">Türkçe (Turkish)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/ukranian_app.ai">Українська (Ukrainian)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/vietnamese_app.ai">Tiếng Việt (Vietnamese)</a><br/> + + <a href="{@docRoot}downloads/brand/v2/zulu_app.ai">isiZulu (Zulu)</a><br/> + +</div> +<div style="clear:left"> </div> + + + + + + +<h2>Guidelines</h2> + + <ul> + <li>Do not modify the color, proportions, spacing or any other aspect of the badge image. + </li> + <li>When used alongside logos for other application marketplaces, the Google Play logo + should be of equal or greater size.</li> + <li>When used online, the badge should link to either: + <ul> + <li>A list of products published by you, for example:<br /> + <span style="margin-left:1em;">http://play.google.com/store/search?q=<em>publisherName</em></span> + </li> + <li>A specific app product details page within Google Play, for example:<br /> + <span style="margin-left:1em;">http://play.google.com/store/apps/details?id=<em>packageName</em></span> + </li> + </ul> + </li> + </ul> + +<p>For more information, see the +<a href="{@docRoot}distribute/tools/promote/brand.html#brand-google_play">Brand +Guidelines</a>. + + +<p>To quickly create a badge that links to your apps on Google Play, +use the <a +href="{@docRoot}distribute/tools/promote/badges.html">Googe Play badge generator</a>.</p> + + +
\ No newline at end of file diff --git a/docs/html/distribute/tools/promote/badges.jd b/docs/html/distribute/tools/promote/badges.jd new file mode 100644 index 0000000..e91a804 --- /dev/null +++ b/docs/html/distribute/tools/promote/badges.jd @@ -0,0 +1,362 @@ +page.title=Google Play Badge Generator +page.image=/images/gp-badges-set.png +page.metaDescription=Build badges for your app in just a few clicks, or download hi-res badge assets localized for a variety of languages. +meta.tags="disttools, promoting, deviceart, marketing, googleplay" +page.tags="badge, google play" + +@jd:body + +<p itemprop="description">Google Play badges enable you to promote your apps with +official branding in your online ads, promotional materials, or anywhere you want +a link to your apps</p> + +<p>In the form below, +input your app's package name or publisher name, choose the badge style, +click <em>Build my badge</em>, then paste the HTML into your web content.</p> + +<p>If you're creating a promotional web page for your app, you should also use the +<a href="{@docRoot}distribute/tools/promote/device-art.html">Device Art Generator</a>, which quickly +wraps your screenshots in real device artwork.</p> + +<p>For guidelines when using the Google Play badge and other brand assets, +see the <a href="{@docRoot}distribute/tools/promote/brand.html#brand-google_play">Brand +Guidelines</a>.</p> + +<style type="text/css"> + +form.button-form { + margin-top:2em; +} + +/* the label and input elements are blocks that float left in order to + keep the left edgets of the input aligned, and IE 6/7 do not fully support "inline-block" */ +label.block { + display: block; + float: left; + width: 100px; + padding-right: 10px; +} + +input.text { + display: block; + float: left; + width: 250px; +} + +div.button-row { + white-space:nowrap; + min-height:80px; +} + +div.button-row input { + vertical-align:middle; + margin:0 5px 0 0; +} + +#jd-content div.button-row img { + margin: 0; + vertical-align:middle; +} + +</style> + +<script type="text/javascript"> + +// locales for which we have the 'app' badge +var APP_LANGS = ['it','pt-br','pt-pt','nl','ko','ja','fr','es','es-419','en','de']; + +// variables for creating 'try it out' demo button +var imagePath = "{@docRoot}images/brand/" +var linkStart = "<a href=\"https://play.google.com/store/"; +var imageStart = "\">\n" + + " <img alt=\""; + // leaves opening for the alt text value +var imageSrc = "\"\n src=\"" + imagePath; + // leaves opening for the image file name +var imageEnd = ".png\" />\n</a>"; + +// variables for creating code snippet +var linkStartCode = "<a href=\"https://play.google.com/store/"; +var imageStartCode = "\">\n" + + " <img alt=\""; + // leaves opening for the alt text value +var imageSrcCode = "\"\n src=\"" + imagePath; + // leaves opening for the image file name +var imageEndCode = ".png\" />\n</a>"; + +/** Generate the HTML snippet and demo based on form values */ +function buildButton(form) { + var lang = $('#locale option:selected').val(); + var selectedValue = lang + $('form input[type=radio]:checked').val(); + var altText = selectedValue.indexOf("generic") != -1 ? "Get it on Google Play" : "Android app on Google Play"; + + if (form["package"].value != "com.example.android") { + $("#preview").show(); + var packageName = escapeHTML(form["package"].value); + $("#snippet").show().html(linkStartCode + "apps/details?id=" + packageName + + imageStartCode + altText + imageSrcCode + + selectedValue + imageEndCode); + $("#button-preview").html(linkStart + "apps/details?id=" + packageName + + imageStart + altText + imageSrc + + selectedValue + imageEnd); + + // Send the event to Analytics + _gaq.push(['_trackEvent', 'Distribute', 'Create Google Play Badge', 'Package ' + selectedValue]); + } else if (form["publisher"].value != "Example, Inc.") { + $("#preview").show(); + var publisherName = escapeHTML(form["publisher"].value); + $("#snippet").show().html(linkStartCode + "search?q=pub:" + publisherName + + imageStartCode + altText + imageSrcCode + + selectedValue + imageEndCode); + $("#button-preview").html(linkStart + "search?q=pub:" + publisherName + + imageStart + altText + imageSrc + + selectedValue + imageEnd); + + // Send the event to Analytics + _gaq.push(['_trackEvent', 'Distribute', 'Create Google Play Badge', 'Publisher ' + selectedValue]); + } else { + alert("Please enter your package name or publisher name"); + } + return false; +} + +/** Listen for Enter key */ +function onTextEntered(event, form, me) { + // 13 = enter + if (event.keyCode == 13) { + buildButton(form); + } +} + +/** When input is focused, remove example text and disable other input */ +function onInputFocus(object, example) { + if (object.value == example) { + $(object).val('').css({'color' : '#000'}); + } + $('input[type="text"]:not(input[name='+object.name+'])', + object.parentNode).attr('disabled','true'); + $('#'+object.name+'-clear').show(); +} + +/** When input is blured, restore example text if appropriate and enable other input */ +function onInputBlur(object, example) { + if (object.value.length < 1) { + $(object).attr('value',example).css({'color':'#ccc'}); + $('input[type="text"]', object.parentNode).removeAttr('disabled'); + $('#'+object.name+'-clear').hide(); + } +} + +/** Clear the form to start over */ +function clearLabel(id, example) { + $("#preview").hide(); + $('#'+id+'').html('').attr('value',example).css({'color':'#ccc'}); + $('input[type="text"]', $('#'+id+'').parent()).removeAttr('disabled'); + $('#'+id+'-clear').hide(); + return false; +} + +/** Switch the badge urls for selected language */ +function changeBadgeLang() { + var lang = $('#locale option:selected').val(); + + // check if we have the 'app' badge for this lang and show notice if not + $("div.button-row.error").remove(); // remove any existing instance of error message + if ($.inArray(lang,APP_LANGS) == -1) { + $("div.button-row.app").hide(); + $("div.button-row.app").after('<div class="button-row error"><p class="note" style="margin:1em 0 -1em">' + + 'Sorry, we currently don\'t have the ' + + '<em>Android app on Google Play</em> badge translated for ' + + $("select#locale option[value="+lang+"]").attr("title") + + '.<br>Please check back later or instead use the <em>Get it on Google Play</em> badge below.' + + '</p></div>'); + } else { + $("div.button-row.app").show(); // show the 'app' badge row + } + + $('.button-row img').each(function() { + var id = $(this).parent().attr('for'); + var imgName = lang + $('input#'+id).attr('value') + '.png'; + var lastSlash = $(this).attr('src').lastIndexOf('/'); + var imgPath = $(this).attr('src').substring(0, lastSlash+1); + $(this).attr('src', imgPath + imgName); + }); +} + +/** When the doc is ready, find the inputs and color the input grey if the value is the example + text. This is necessary to handle back-navigation, which can auto-fill the form with previous + values (and text should not be grey) */ +$(document).ready(function() { + $(".button-form input.text").each(function(index) { + if ($(this).val() == $(this).attr("default")) { + $(this).css("color","#ccc"); + } else { + /* This is necessary to handle back-navigation to the page after form was filled */ + $('input[type="text"]:not(input[name='+this.name+'])', + this.parentNode).attr('disabled','true'); + $('#'+this.name+'-clear').show(); + } + }); +}); + +</script> + +<form class="button-form"> + <label class="block" for="locale">Language:</label> + <select id="locale" style="display:block;float:left;margin:0" + onchange="changeBadgeLang()"> + <option title="Afrikaans" + value="af">Afrikaans</option> + <option title="Arabic" + value="ar">العربية</option> + <option title="Belarusian" + value="be">Беларуская</option> + <option title="Bulgarian" + value="bg">Български</option> + <option title="Catalan" + value="ca">Català</option> + <option title="Chinese (China)" + value="zh-cn">中文 (中国)</option> + <option title="Chinese (Hong Kong)" + value="zh-hk">中文(香港)</option> + <option title="Chinese (Taiwan)" + value="zh-tw">中文 (台灣)</option> + <option title="Croatian" + value="hr">Hrvatski</option> + <option title="Czech" + value="cs">Česky</option> + <option title="Danish" + value="da">Dansk</option> + <option title="Dutch" + value="nl">Nederlands</option> + <option title="Estonian" + value="et">Eesti</option> + <option title="Farsi - Persian" + value="fa">فارسی</option> + <option title="Filipino" + value="fil">Tagalog</option> + <option title="Finnish" + value="fi">Suomi</option> + <option title="French" + value="fr">Français</option> + <option title="German" + value="de">Deutsch</option> + <option title="Greek" + value="el">Ελληνικά</option> + <option title="English" + value="en" selected="true">English</option> +<!-- + <option title="Hebrew" + value="iw-he">עברית</option> +--> + <option title="Hungarian" + value="hu">Magyar</option> + <option title="Indonesian" + value="id-in">Bahasa Indonesia</option> + <option title="Italian" + value="it">Italiano</option> + <option title="Japanese" + value="ja">日本語</option> + <option title="Korean" + value="ko">한국어</option> + <option title="Latvian" + value="lv">Latviešu</option> + <option title="Lithuanian" + value="lt">Lietuviškai</option> + <option title="Malay" + value="ms">Bahasa Melayu</option> + <option title="Norwegian" + value="no">Norsk (bokmål)</option> + <option title="Polish" + value="pl">Polski</option> + <option title="Portuguese (Brazil)" + value="pt-br">Português (Brasil)</option> + <option title="Portuguese (Portugal)" + value="pt-pt">Português (Portugal)</option> + <option title="Romanian" + value="ro">Română</option> + <option title="Russian" + value="ru">Русский</option> + <option title="Serbian" + value="sr">Српски / srpski</option> + <option title="Slovak" + value="sk">Slovenčina</option> + <option title="Slovenian" + value="sl">Slovenščina</option> + <option title="Spanish (Spain)" + value="es">Español (España)</option> + <option title="Spanish (Latin America)" + value="es-419">Español (Latinoamérica)</option> + <option title="Swedish" + value="sv">Svenska</option> + <option title="Swahili" + value="sw">Kiswahili</option> + <option title="Thai" + value="th">ไทย</option> + <option title="Turkish" + value="tr">Türkçe</option> + <option title="Ukrainian" + value="uk">Українська</option> + <option title="Vietnamese" + value="vi">Tiếng Việt</option> + <option title="Zulu" + value="zu">isiZulu</option> + </select> + <p style="clear:both;margin:0"> </p> + <label class="block" for="package" style="clear:left">Package name:</label> + <input class="text" type="text" id="package" name="package" + value="com.example.android" + default="com.example.android" + onfocus="onInputFocus(this, 'com.example.android')" + onblur="onInputBlur(this, 'com.example.android')" + onkeyup="return onTextEntered(event, this.parentNode, this)"/> + <a id="package-clear" style="display:none" href="#" + onclick="return clearLabel('package','com.example.android');">clear</a> + <p style="clear:both;margin:0"> <em>or</em></p> + <label class="block" style="margin-top:5px" for="publisher">Publisher name:</label> + <input class="text" type="text" id="publisher" name="publisher" + value="Example, Inc." + default="Example, Inc." + onfocus="onInputFocus(this, 'Example, Inc.')" + onblur="onInputBlur(this, 'Example, Inc.')" + onkeyup="return onTextEntered(event, this.parentNode, this)"/> + <a id="publisher-clear" style="display:none" href="#" + onclick="return clearLabel('publisher','Example, Inc.');">clear</a> + <br/><br/> + + +<div class="button-row app"> + <input type="radio" name="buttonStyle" value="_app_rgb_wo_45" id="ws" /> + <label for="ws"><img src="{@docRoot}images/brand/en_app_rgb_wo_45.png" +alt="Android app on Google Play (small)" /></label> + + <input type="radio" name="buttonStyle" value="_app_rgb_wo_60" id="wm" /> + <label for="wm"><img src="{@docRoot}images/brand/en_app_rgb_wo_60.png" +alt="Android app on Google Play (large)" /></label> +</div> + +<div class="button-row"> + <input type="radio" name="buttonStyle" value="_generic_rgb_wo_45" id="ns" checked="checked" /> + <label for="ns"><img src="{@docRoot}images/brand/en_generic_rgb_wo_45.png" +alt="Get it on Google Play (small)" /></label> + + <input type="radio" name="buttonStyle" value="_generic_rgb_wo_60" id="nm" /> + <label for="nm"><img src="{@docRoot}images/brand/en_generic_rgb_wo_60.png" +alt="Get it on Google Play (large)" /></label> +</div> + + <input class="button" onclick="return buildButton(this.parentNode);" + type="button" value="Build my badge" style="padding:10px" /> + <br/> +</form> + +<div id="preview" style="display:none"> + <p>Copy and paste this HTML into your web site:</p> + <textarea id="snippet" cols="100" rows="5" onclick="this.select()" +style="font-family:monospace;background-color:#efefef;padding:5px;display:none;margin-bottom:1em"> + </textarea > + +<p>Try it out:</p> +<div id="button-preview" style="margin-top:1em"></div> +</div> + diff --git a/docs/html/distribute/tools/promote/brand.jd b/docs/html/distribute/tools/promote/brand.jd new file mode 100644 index 0000000..2116c0f --- /dev/null +++ b/docs/html/distribute/tools/promote/brand.jd @@ -0,0 +1,195 @@ +page.title=Brand Guidelines +page.image=/assets/images/resource-card-default-android.jpg +page.metaDescription=Guidelines and downloads for the Android and Google Play brands. +page.tags="brand, bugdroid, assets" + +@jd:body + +<p>We encourage you to use the Android and Google Play brands with your Android app +promotional materials. You can use the icons and other assets on this page +provided that you follow the guidelines.</p> + +<h2 id="brand-android">Android</h2> + + <p>The following are guidelines for the Android brand + and related assets.</p> + + + <h4 style="clear:right">Android in text</h4> + + <div style="float:right;clear:right;width:200px;margin:0 0 20px 30px"> + <img alt="" src="{@docRoot}images/brand/mediaplayer.png"> + </div> + <ul> + <li>Android™ should have a trademark symbol the first time it appears in a creative.</li> + <li>Android should always be capitalized and is never plural or possessive.</li> + <li>"Android" cannot be used in names of applications or accessory products, + including phones, tablets, TVs, speakers, headphones, watches, and other devices. Instead use "for Android". + <ul> + <li><span style="color:red">Incorrect</span>: "Android MediaPlayer"</li> + <li><span style="color:green">Correct</span>: "MediaPlayer for Android"</li> + </ul> + <p>If used with your logo, "for Android" needs to be smaller in size than your logo. + First instance of this use should be followed by a TM symbol, "for Android™".</p> + </li> + <li>Android may be used as a descriptor, as long as it is followed by a proper generic term. + <ul> + <li><span style="color:red">Incorrect</span>: "Android MediaPlayer" or "Android XYZ app"</li> + <li><span style="color:green">Correct</span>: "Android features" or "Android applications"</li> + </ul> + </li> + </ul> + + <p>Any use of the Android name needs to include this + attribution in your communication:</p> + <blockquote><em>Android is a trademark of Google Inc.</em></blockquote></p> + + + <h4>Android robot</h4> + + <div style="float:right;width:200px;margin-left:30px"> + <img alt="" src="{@docRoot}images/brand/Android_Robot_100.png" + style="margin-left:50px"> + <p style="text-align:center"> + <a href="{@docRoot}images/brand/Android_Robot_100.png">100x118</a> | + <a href="{@docRoot}images/brand/Android_Robot_200.png">200x237</a><br> + <a href="{@docRoot}downloads/brand/Android_Robot_outlined.ai">Illustrator (.ai)</a></p> + </div> + + <p>The Android robot can be used, reproduced, and modified freely in marketing + communications. The color value for print is PMS 376C and the online hex + color is <span style="color:#A4C639">#A4C639</span>.</p> + + <p>When using the Android Robot or any modification of it, proper attribution is + required under the terms of the <a href="http://creativecommons.org/licenses/by/3.0/">Creative +Commons Attribution</a> license:</p> + + <blockquote><em>The Android robot is reproduced or modified from work created and shared by Google and +used according to terms described in the Creative Commons 3.0 Attribution License.</em></blockquote> + + <p>You may not file trademark applications incorporating the Android robot logo or +derivatives thereof. We want to ensure that the Android robot remains available +for all to use.</p> + + +<h4 style="clear:right">Android logo</h4> + +<div style="float:right;width:210px;margin-left:30px;margin-top:-10px"> + <img alt="" src="{@docRoot}images/brand/android_logo_no.png"> +</div> + +<p>The Android logo may not be used. Nor can this be used with the Android robot.</p> +<p>The custom typeface may not be used.</p> + + + + +<h2 id="brand-google_play">Google Play</h2> + + + <p>The following are guidelines for the Google Play brand + and related assets.</p> + +<h4>Google Play in text</h4> + +<p>Always include a TM symbol on the first or most prominent instance of Google Play™ +in text.</p> + +<p>When referring to the mobile experience, use "Google Play" unless the text is clearly +instructional for the user. For example, a marketing headline might read "Download our +games on Google Play™," but instructional text would read "Download our games using the Google +Play™ Store app." + + <p>Any use of the Google Play name or icon needs to include this + attribution in your communication:</p> + +<blockquote><em>Google Play is a trademark of Google Inc.</em></blockquote> + + + <div style="float:right;width:96px;margin-left:30px;margin-top:-20px"> + <img src="{@docRoot}images/brand/Google_Play_Store_96.png" alt=""> + <p style="text-align:center"> + <a href="{@docRoot}images/brand/Google_Play_Store_48.png">48x48</a> | + <a href="{@docRoot}images/brand/Google_Play_Store_96.png">96x96</a><br> + <a href="{@docRoot}downloads/brand/Google_Play_Store.ai">Illustrator (.ai)</a> + </p> + </div> + +<h4>Google Play Store icon</h4> + +<p>You may use the Google Play Store icon, but you may not modify it.</p> + +<p>As mentioned above, when referring to the Google Play Store app in copy, use the full name: +"Google Play Store." However, when labeling the Google Play Store icon directly, it's OK to use +"Play Store" alone to accurately reflect the icon label as it appears on a device.</p> + + +<h4>Google Play badge</h4> + + <div style="float:right;clear:right;width:172px;margin-left:30px"> + <img src="{@docRoot}images/brand/en_app_rgb_wo_60.png" alt=""> + <p style="text-align:center"> + <a href="{@docRoot}images/brand/en_app_rgb_wo_45.png">129x45</a> | + <a href="{@docRoot}images/brand/en_app_rgb_wo_60.png">172x60</a></p> + </div> + + <div style="float:right;clear:right;width:172px;margin-left:30px"> + <img src="{@docRoot}images/brand/en_generic_rgb_wo_60.png" alt=""> + <p style="text-align:center"> + <a href="{@docRoot}images/brand/en_generic_rgb_wo_45.png">129x45</a> | + <a href="{@docRoot}images/brand/en_generic_rgb_wo_60.png">172x60</a></p> + </div> + + <p>The "Get it on Google Play" and "Android App on Google Play" logos are badges that you + can use on your website and promotional materials, to point to your products on Google + Play.</p> + + <ul> + <li>Don't modify the color, proportions, spacing, or any other aspect of the badge image. + </li> + <li>When used alongside logos for other application marketplaces, the Google Play logo + should be of equal or greater size.</li> + <li>When used online, the badge should link to either: + <ul> + <li>A list of products published by you, for example:<br /> + <span style="margin-left:1em;">http://play.google.com/store/search?q=<em>publisherName</em></span> + </li> + <li>A specific app product details page within Google Play, for example:<br /> + <span style="margin-left:1em;">http://play.google.com/store/apps/details?id=<em>packageName</em></span> + </li> + </ul> + </li> + </ul> + + <p>To quickly create a badge that links to your apps on Google Play, + use the <a + href="{@docRoot}distribute/tools/promote/badges.html">Googe Play badge generator</a> + (provides the badge in over 40 languages).</p> + + <p>To create your own size, download an Adobe® Illustrator® (.ai) file for the + <a href="{@docRoot}distribute/tools/promote/badge-files.html">Google Play + badge in over 40 languages</a>.</p> + + <p>For details on all the ways that you can link to your product details page in Google Play, + see <a href="{@docRoot}distribute/tools/promote/linking.html">Linking to your products</a></p> + + + +<h2 id="Questions">Questions</h2> + +<p>To view our full guidelines or for any further brand usage questions, please contact our +Android Partner Marketing team:</p> +<ul> + <li>For North and South America, please contact <a + href="mailto:android-brand-approvals@google.com?Subject=Brand%20Approval%20Questions" + >android-brand-approvals@google.com</a></li> + + <li>For Europe and Emerging Markets, please contact <a + href="mailto:emea-android-brand@google.com?Subject=Brand%20Approval%20Questions" + >emea-android-brand@google.com</a></li> + + <li>For Asia and Pacific-America, please contact <a + href="mailto:apac-android-brand-approvals@google.com?Subject=Brand%20Approval%20Questions" + >apac-android-brand-approvals@google.com</a></li> +</ul> + diff --git a/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/land_back.png b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/land_back.png Binary files differnew file mode 100644 index 0000000..f340a62 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/land_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/land_fore.png b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/land_fore.png Binary files differnew file mode 100644 index 0000000..2a4e595 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/land_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/land_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/land_shadow.png Binary files differnew file mode 100644 index 0000000..f3a3120 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/land_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/port_back.png b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/port_back.png Binary files differnew file mode 100644 index 0000000..c40b37c --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/port_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/port_fore.png b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/port_fore.png Binary files differnew file mode 100644 index 0000000..aae684b --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/port_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/port_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/port_shadow.png Binary files differnew file mode 100644 index 0000000..61a0da9 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/port_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/thumb.png b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/thumb.png Binary files differnew file mode 100644 index 0000000..e21a421 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/galaxy_nexus/thumb.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_10/land_back.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/land_back.png Binary files differnew file mode 100644 index 0000000..24a9c80 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/land_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_10/land_fore.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/land_fore.png Binary files differnew file mode 100644 index 0000000..183caa1 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/land_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_10/land_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/land_shadow.png Binary files differnew file mode 100644 index 0000000..1d23d70 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/land_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_10/port_back.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/port_back.png Binary files differnew file mode 100644 index 0000000..51328b4 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/port_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_10/port_fore.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/port_fore.png Binary files differnew file mode 100644 index 0000000..57899d4 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/port_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_10/port_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/port_shadow.png Binary files differnew file mode 100644 index 0000000..c329f10 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/port_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_10/thumb.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/thumb.png Binary files differnew file mode 100644 index 0000000..ec12a01 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_10/thumb.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_4/land_back.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/land_back.png Binary files differnew file mode 100644 index 0000000..57a011a --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/land_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_4/land_fore.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/land_fore.png Binary files differnew file mode 100644 index 0000000..72c9654 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/land_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_4/land_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/land_shadow.png Binary files differnew file mode 100644 index 0000000..d80a5fd --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/land_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_4/port_back.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/port_back.png Binary files differnew file mode 100644 index 0000000..e64fae4 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/port_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_4/port_fore.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/port_fore.png Binary files differnew file mode 100644 index 0000000..c9fb062 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/port_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_4/port_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/port_shadow.png Binary files differnew file mode 100644 index 0000000..b2064a3 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/port_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_4/thumb.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/thumb.png Binary files differnew file mode 100644 index 0000000..2988dc9 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_4/thumb.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_5/land_back.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/land_back.png Binary files differnew file mode 100644 index 0000000..697c017 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/land_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_5/land_fore.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/land_fore.png Binary files differnew file mode 100644 index 0000000..29aed61 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/land_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_5/land_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/land_shadow.png Binary files differnew file mode 100644 index 0000000..fad6db1 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/land_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_5/port_back.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/port_back.png Binary files differnew file mode 100644 index 0000000..b31aac6 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/port_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_5/port_fore.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/port_fore.png Binary files differnew file mode 100644 index 0000000..aed056e --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/port_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_5/port_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/port_shadow.png Binary files differnew file mode 100644 index 0000000..b3ae20c --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/port_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_5/thumb.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/thumb.png Binary files differnew file mode 100644 index 0000000..e013e39 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_5/thumb.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7/land_back.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/land_back.png Binary files differnew file mode 100644 index 0000000..cc5b1af --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/land_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7/land_fore.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/land_fore.png Binary files differnew file mode 100644 index 0000000..2625edb --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/land_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7/land_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/land_shadow.png Binary files differnew file mode 100644 index 0000000..9d91475 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/land_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7/port_back.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/port_back.png Binary files differnew file mode 100644 index 0000000..f54a8af --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/port_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7/port_fore.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/port_fore.png Binary files differnew file mode 100644 index 0000000..230bad4 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/port_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7/port_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/port_shadow.png Binary files differnew file mode 100644 index 0000000..2401d20 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/port_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7/thumb.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/thumb.png Binary files differnew file mode 100644 index 0000000..57b4c03 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7/thumb.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/land_back.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/land_back.png Binary files differnew file mode 100644 index 0000000..697fb7d --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/land_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/land_fore.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/land_fore.png Binary files differnew file mode 100644 index 0000000..735262f --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/land_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/land_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/land_shadow.png Binary files differnew file mode 100644 index 0000000..cfb7952 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/land_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/port_back.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/port_back.png Binary files differnew file mode 100644 index 0000000..5bb815a --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/port_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/port_fore.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/port_fore.png Binary files differnew file mode 100644 index 0000000..1be3b21 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/port_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/port_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/port_shadow.png Binary files differnew file mode 100644 index 0000000..7e8aff2 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/port_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/thumb.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/thumb.png Binary files differnew file mode 100644 index 0000000..b5db82e --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_7_2012/thumb.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_s/land_back.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/land_back.png Binary files differnew file mode 100644 index 0000000..f525e8e --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/land_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_s/land_fore.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/land_fore.png Binary files differnew file mode 100644 index 0000000..e26bfe1 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/land_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_s/land_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/land_shadow.png Binary files differnew file mode 100644 index 0000000..ea26b73 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/land_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_s/port_back.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/port_back.png Binary files differnew file mode 100644 index 0000000..ed4ad0c --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/port_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_s/port_fore.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/port_fore.png Binary files differnew file mode 100644 index 0000000..74bd077 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/port_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_s/port_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/port_shadow.png Binary files differnew file mode 100644 index 0000000..bb4bec8 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/port_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/nexus_s/thumb.png b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/thumb.png Binary files differnew file mode 100644 index 0000000..8b9a3d9 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/nexus_s/thumb.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/xoom/land_back.png b/docs/html/distribute/tools/promote/device-art-resources/xoom/land_back.png Binary files differnew file mode 100644 index 0000000..e1eb075 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/xoom/land_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/xoom/land_fore.png b/docs/html/distribute/tools/promote/device-art-resources/xoom/land_fore.png Binary files differnew file mode 100644 index 0000000..15e5f50 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/xoom/land_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/xoom/land_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/xoom/land_shadow.png Binary files differnew file mode 100644 index 0000000..885508a --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/xoom/land_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/xoom/port_back.png b/docs/html/distribute/tools/promote/device-art-resources/xoom/port_back.png Binary files differnew file mode 100644 index 0000000..290ca35 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/xoom/port_back.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/xoom/port_fore.png b/docs/html/distribute/tools/promote/device-art-resources/xoom/port_fore.png Binary files differnew file mode 100644 index 0000000..8b3dca3 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/xoom/port_fore.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/xoom/port_shadow.png b/docs/html/distribute/tools/promote/device-art-resources/xoom/port_shadow.png Binary files differnew file mode 100644 index 0000000..895b75e --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/xoom/port_shadow.png diff --git a/docs/html/distribute/tools/promote/device-art-resources/xoom/thumb.png b/docs/html/distribute/tools/promote/device-art-resources/xoom/thumb.png Binary files differnew file mode 100644 index 0000000..8fd08a4 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art-resources/xoom/thumb.png diff --git a/docs/html/distribute/tools/promote/device-art.jd b/docs/html/distribute/tools/promote/device-art.jd new file mode 100644 index 0000000..b0b5f84 --- /dev/null +++ b/docs/html/distribute/tools/promote/device-art.jd @@ -0,0 +1,697 @@ +page.title=Device Art Generator +page.image=/images/device-art-ex-crop.jpg +page.metaDescription=Drag and drop screenshots of your app into real device artwork, for better looking promotional images and improved visual context. +meta.tags="disttools, promoting, deviceart, marketing" +page.tags="device, deviceart, nexus, assets" +Xnonavpage=true + +@jd:body + +<p>The device art generator enables you to quickly wrap app screenshots in real device artwork. This provides better visual context for your app screenshots on your website or in other promotional materials</p> + +<p class="note"><strong>Note</strong>: Do <em>not</em> use graphics created here in your 1024x500 +feature image or screenshots for your Google Play app listing.</p> + +<hr> + +<div class="supported-browser"> + +<div class="layout-content-row"> + <div class="layout-content-col span-3"> + <h4>Step 1</h4> + <p>Drag a screenshot from your desktop onto a device to the right.</p> + </div> + <div class="layout-content-col span-10"> + <ul class="device-list primary"></ul> + <a href="#" id="archive-expando">Older devices</a> + <ul class="device-list archive"></ul> + </div> +</div> + +<hr> + +<div class="layout-content-row"> + <div class="layout-content-col span-3"> + <h4>Step 2</h4> + <p>Customize the generated image and drag it to your desktop to save.</p> + <p id="frame-customizations"> + <input type="checkbox" id="output-shadow" checked="checked" class="form-field-checkbutton"> + <label for="output-shadow">Shadow</label><br> + <input type="checkbox" id="output-glare" checked="checked" class="form-field-checkbutton"> + <label for="output-glare">Screen Glare</label><br><br> + <a class="button" id="rotate-button">Rotate</a> + </p> + </div> + <div class="layout-content-col span-10"> + <!-- position:relative fixes an issue where dragging an image out of a inline-block container + produced no drag feedback image in Chrome 28. --> + <div id="output" style="position:relative">No input image.</div> + </div> +</div> + +</div> + +<div class="unsupported-browser" style="display: none"> + <p class="warning"><strong>Error:</strong> This page requires + <span id="unsupported-browser-reason">certain features</span>, which your web browser + doesn't support. To continue, navigate to this page on a supported web browser, such as + <strong>Google Chrome</strong>.</p> + <a href="https://www.google.com/chrome/" class="button">Get Google Chrome</a> + <br><br> +</div> + +<style> + h4 { + text-transform: uppercase; + } + + .device-list { + padding: 0; + margin: 0; + } + + .device-list li { + display: inline-block; + vertical-align: bottom; + margin: 0; + margin-right: 20px; + text-align: center; + } + + .device-list li .thumb-container { + display: inline-block; + } + + .device-list li .thumb-container img { + margin-bottom: 8px; + opacity: 0.6; + + -webkit-transition: -webkit-transform 0.2s, opacity 0.2s; + -moz-transition: -moz-transform 0.2s, opacity 0.2s; + transition: transform 0.2s, opacity 0.2s; + } + + .device-list li.drag-hover .thumb-container img { + opacity: 1; + + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + transform: scale(1.1); + } + + .device-list li .device-details { + font-size: 13px; + line-height: 16px; + color: #888; + } + + .device-list li .device-url { + font-weight: bold; + } + + #archive-expando { + display: block; + font-size: 13px; + font-weight: bold; + color: #333; + text-transform: uppercase; + margin-top: 16px; + padding-top: 16px; + padding-left: 28px; + border-top: 1px solid transparent; + background: transparent url({@docRoot}assets/images/styles/disclosure_down.png) + no-repeat scroll 0 8px; + -webkit-transition: border 0.2s; + -moz-transition: border 0.2s; + transition: border 0.2s; + } + + #archive-expando.expanded { + background-image: url({@docRoot}assets/images/styles/disclosure_up.png); + border-top: 1px solid #ccc; + } + + .device-list.archive { + max-height: 0; + overflow: hidden; + opacity: 0; + + -webkit-transition: max-height 0.2s, opacity 0.2s; + -moz-transition: max-height 0.2s, opacity 0.2s; + transition: max-height 0.2s, opacity 0.2s; + } + + .device-list.archive.expanded { + opacity: 1; + max-height: 300px; + } + + #output { + color: #f44; + font-style: italic; + } + + #output img { + max-height: 500px; + } +</style> +<script> + // Global variables + var g_currentImage; + var g_currentDevice; + var g_currentObjectURL; + var g_currentBlob; + + // Global constants + var MSG_INVALID_INPUT_IMAGE = 'Invalid screenshot provided. Screenshots must be PNG files ' + + 'matching the target device\'s screen aspect ratio in either portrait or landscape.'; + var MSG_NO_INPUT_IMAGE = 'Drag a screenshot (in PNG format) from your desktop onto a ' + + 'target device above.' + var MSG_GENERATING_IMAGE = 'Generating device art…'; + + var MAX_DISPLAY_HEIGHT = 126; // XOOM, to fit into 200px wide + + // Device manifest. + var DEVICES = [ + { + id: 'nexus_5', + title: 'Nexus 5', + url: 'http://www.google.com/nexus/5/', + physicalSize: 5, + physicalHeight: 5.43, + density: 'XXHDPI', + landRes: ['shadow', 'back', 'fore'], + landOffset: [436,306], + portRes: ['shadow', 'back', 'fore'], + portOffset: [304,436], + portSize: [1080,1920], + }, + { + id: 'nexus_7', + title: 'Nexus 7', + url: 'http://www.google.com/nexus/7/', + physicalSize: 7, + physicalHeight: 8, + actualResolution: [1200,1920], + density: 'XHDPI', + landRes: ['shadow', 'back', 'fore'], + landOffset: [326,245], + portRes: ['shadow', 'back', 'fore'], + portOffset: [244,326], + portSize: [800,1280] + }, + { + id: 'nexus_10', + title: 'Nexus 10', + url: 'http://www.google.com/nexus/10/', + physicalSize: 10, + physicalHeight: 7, + actualResolution: [1600,2560], + density: 'XHDPI', + landRes: ['shadow', 'back', 'fore'], + landOffset: [227,217], + portRes: ['shadow', 'back', 'fore'], + portOffset: [217,223], + portSize: [800,1280] + }, + { + id: 'xoom', + title: 'Motorola XOOM', + url: 'http://www.google.com/phone/detail/motorola-xoom', + physicalSize: 10, + physicalHeight: 6.61, + density: 'MDPI', + landRes: ['shadow', 'back', 'fore'], + landOffset: [218,191], + portRes: ['shadow', 'back', 'fore'], + portOffset: [199,200], + portSize: [800,1280], + archived: true + }, + { + id: 'nexus_7_2012', + title: 'Nexus 7 (2012)', + url: 'http://www.google.com/nexus/7/', + physicalSize: 7, + physicalHeight: 7.81, + density: '213dpi', + landRes: ['shadow', 'back', 'fore'], + landOffset: [315,270], + portRes: ['shadow', 'back', 'fore'], + portOffset: [264,311], + portSize: [800,1280], + archived: true + }, + { + id: 'nexus_4', + title: 'Nexus 4', + url: 'http://www.google.com/nexus/4/', + physicalSize: 4.7, + physicalHeight: 5.27, + density: 'XHDPI', + landRes: ['shadow', 'back', 'fore'], + landOffset: [349,214], + portRes: ['shadow', 'back', 'fore'], + portOffset: [213,350], + portSize: [768,1280], + archived: true + }, + { + id: 'galaxy_nexus', + title: 'Galaxy Nexus', + url: 'http://www.android.com/devices/detail/galaxy-nexus', + physicalSize: 4.65, + physicalHeight: 5.33, + density: 'XHDPI', + landRes: ['shadow', 'back', 'fore'], + landOffset: [371,199], + portRes: ['shadow', 'back', 'fore'], + portOffset: [216,353], + portSize: [720,1280], + archived: true + }, + { + id: 'nexus_s', + title: 'Nexus S', + url: 'http://www.google.com/phone/detail/nexus-s', + physicalSize: 4.0, + physicalHeight: 4.88, + density: 'HDPI', + landRes: ['shadow', 'back', 'fore'], + landOffset: [247,135], + portRes: ['shadow', 'back', 'fore'], + portOffset: [134,247], + portSize: [480,800], + archived: true + } + ]; + + DEVICES = DEVICES.sort(function(x, y) { return x.physicalSize - y.physicalSize; }); + + var MAX_HEIGHT = 0; + for (var i = 0; i < DEVICES.length; i++) { + MAX_HEIGHT = Math.max(MAX_HEIGHT, DEVICES[i].physicalHeight); + } + + // Setup performed once the DOM is ready. + $(document).ready(function() { + if (!checkBrowser()) { + return; + } + + polyfillCanvasToBlob(); + setupUI(); + + // Set up Chrome drag-out + $.event.props.push("dataTransfer"); + document.body.addEventListener('dragstart', function(e) { + var target = e.target; + if (target.classList.contains('dragout')) { + e.dataTransfer.setData('DownloadURL', target.dataset.downloadurl); + } + }, false); + }); + + /** + * Returns the device from DEVICES with the given id. + */ + function getDeviceById(id) { + for (var i = 0; i < DEVICES.length; i++) { + if (DEVICES[i].id == id) + return DEVICES[i]; + } + return; + } + + /** + * Checks to make sure the browser supports this page. If not, + * updates the UI accordingly and returns false. + */ + function checkBrowser() { + // Check for browser support + var browserSupportError = null; + + // Must have <canvas> + var elem = document.createElement('canvas'); + if (!elem.getContext || !elem.getContext('2d')) { + browserSupportError = 'HTML5 canvas.'; + } + + // Must have FileReader + if (!window.FileReader) { + browserSupportError = 'desktop file access'; + } + + if (browserSupportError) { + $('.supported-browser').hide(); + + $('#unsupported-browser-reason').html(browserSupportError); + $('.unsupported-browser').show(); + return false; + } + + return true; + } + + function setupUI() { + $('#output').html(MSG_NO_INPUT_IMAGE); + + $('#frame-customizations').hide(); + + $('#output-shadow, #output-glare').click(function() { + createFrame(); + }); + + // Build device list. + $.each(DEVICES, function() { + var resolution = this.actualResolution || this.portSize; + var scaleFactorText = ''; + if (resolution[0] != this.portSize[0]) { + scaleFactorText = '<br>' + (100 * (this.portSize[0] / resolution[0])).toFixed(0) + + '% size output'; + } else { + scaleFactorText = '<br> '; + } + + $('<li>') + .append($('<div>') + .addClass('thumb-container') + .append($('<img>') + .attr('src', 'device-art-resources/' + this.id + '/thumb.png') + .attr('height', + Math.floor(MAX_DISPLAY_HEIGHT * this.physicalHeight / MAX_HEIGHT)))) + .append($('<div>') + .addClass('device-details') + .html((this.url + ? ('<a class="device-url" href="' + this.url + '">' + this.title + '</a>') + : this.title) + + '<br>' + this.physicalSize + '" @ ' + this.density + + '<br>' + (resolution[0] + 'x' + resolution[1]) + scaleFactorText)) + .data('deviceId', this.id) + .appendTo(this.archived ? '.device-list.archive' : '.device-list.primary'); + }); + + // Set up "older devices" expando. + $('#archive-expando').click(function() { + if ($(this).hasClass('expanded')) { + $(this).removeClass('expanded'); + $('.device-list.archive').removeClass('expanded'); + } else { + $(this).addClass('expanded'); + $('.device-list.archive').addClass('expanded'); + } + return false; + }); + + // Set up drag and drop. + $('.device-list li') + .live('dragover', function(evt) { + $(this).addClass('drag-hover'); + evt.dataTransfer.dropEffect = 'link'; + evt.preventDefault(); + }) + .live('dragleave', function(evt) { + $(this).removeClass('drag-hover'); + }) + .live('drop', function(evt) { + $('#output').empty().html(MSG_GENERATING_IMAGE); + $(this).removeClass('drag-hover'); + g_currentDevice = getDeviceById($(this).closest('li').data('deviceId')); + evt.preventDefault(); + loadImageFromFileList(evt.dataTransfer.files, function(data) { + if (data == null) { + $('#output').html(MSG_INVALID_INPUT_IMAGE); + return; + } + loadImageFromUri(data.uri, function(img) { + g_currentFilename = data.name; + g_currentImage = img; + createFrame(); + // Send the event to Analytics + _gaq.push(['_trackEvent', 'Distribute', 'Create Device Art', g_currentDevice.title]); + }); + }); + }); + + // Set up rotate button. + $('#rotate-button').click(function() { + if (!g_currentImage) { + return; + } + + var w = g_currentImage.naturalHeight; + var h = g_currentImage.naturalWidth; + var canvas = $('<canvas>') + .attr('width', w) + .attr('height', h) + .get(0); + + var ctx = canvas.getContext('2d'); + ctx.rotate(-Math.PI / 2); + ctx.translate(-h, 0); + ctx.drawImage(g_currentImage, 0, 0); + + loadImageFromUri(canvas.toDataURL('image/png'), function(img) { + g_currentImage = img; + createFrame(); + }); + }); + } + + /** + * Generates the frame from the current selections (g_currentImage and g_currentDevice). + */ + function createFrame() { + var port; + + var aspect1 = g_currentImage.naturalWidth / g_currentImage.naturalHeight; + var aspect2 = g_currentDevice.portSize[0] / g_currentDevice.portSize[1]; + + if (aspect1 == aspect2) { + port = true; + } else if (aspect1 == 1 / aspect2) { + port = false; + } else { + alert('The screenshot must have an aspect ratio of ' + + aspect2.toFixed(3) + ' or ' + (1 / aspect2).toFixed(3) + + ' (ideally ' + g_currentDevice.portSize[0] + 'x' + g_currentDevice.portSize[1] + + ' or ' + g_currentDevice.portSize[1] + 'x' + g_currentDevice.portSize[0] + ').'); + $('#output').html(MSG_INVALID_INPUT_IMAGE); + return; + } + + // Load image resources + var res = port ? g_currentDevice.portRes : g_currentDevice.landRes; + var resList = {}; + for (var i = 0; i < res.length; i++) { + resList[res[i]] = 'device-art-resources/' + g_currentDevice.id + '/' + + (port ? 'port_' : 'land_') + res[i] + '.png' + } + + var resourceImages = {}; + loadImageResources(resList, function(r) { + resourceImages = r; + continueWithResources_(); + }); + + function continueWithResources_() { + var width = resourceImages['back'].naturalWidth; + var height = resourceImages['back'].naturalHeight; + var offset = port ? g_currentDevice.portOffset : g_currentDevice.landOffset; + var size = port + ? g_currentDevice.portSize + : [g_currentDevice.portSize[1], g_currentDevice.portSize[0]]; + + var canvas = document.createElement('canvas'); + canvas.width = width; + canvas.height = height; + + var ctx = canvas.getContext('2d'); + if (resourceImages['shadow'] && $('#output-shadow').is(':checked')) { + ctx.drawImage(resourceImages['shadow'], 0, 0); + } + ctx.drawImage(resourceImages['back'], 0, 0); + ctx.fillStyle = '#000'; + ctx.fillRect(offset[0], offset[1], size[0], size[1]); + ctx.drawImage(g_currentImage, offset[0], offset[1], size[0], size[1]); + if (resourceImages['fore'] && $('#output-glare').is(':checked')) { + ctx.drawImage(resourceImages['fore'], 0, 0); + } + + window.URL = window.URL || window.webkitURL; + if (canvas.toBlob && window.URL.createObjectURL) { + if (g_currentObjectURL) { + window.URL.revokeObjectURL(g_currentObjectURL); + g_currentObjectURL = null; + } + if (g_currentBlob) { + if (g_currentBlob.close) { + g_currentBlob.close(); + } + g_currentBlob = null; + } + + canvas.toBlob(function(blob) { + if (!blob) { + continueWithFinalUrl_(canvas.toDataURL('image/png')); + return; + } + g_currentBlob = blob; + g_currentObjectURL = window.URL.createObjectURL(blob); + continueWithFinalUrl_(g_currentObjectURL); + }, 'image/png'); + } else { + continueWithFinalUrl_(canvas.toDataURL('image/png')); + } + } + + function continueWithFinalUrl_(imageUrl) { + var filename = g_currentFilename + ? g_currentFilename.replace(/^(.+?)(\.\w+)?$/, '$1_framed.png') + : 'framed_screenshot.png'; + + var $link = $('<a>') + .attr('download', filename) + .attr('href', imageUrl) + .append($('<img>') + .addClass('dragout') + .attr('src', imageUrl) + .attr('draggable', true) + .attr('data-downloadurl', ['image/png', filename, imageUrl].join(':'))) + .appendTo($('#output').empty()); + + $('#frame-customizations').show(); + } + } + + /** + * Loads an image from a data URI. The callback will be called with the <img> once + * it loads. + */ + function loadImageFromUri(uri, callback) { + callback = callback || function(){}; + + var img = document.createElement('img'); + img.src = uri; + img.onload = function() { + callback(img); + }; + img.onerror = function() { + callback(null); + } + } + + /** + * Loads a set of images (organized by ID). Once all images are loaded, the callback + * is triggered with a dictionary of <img>'s, organized by ID. + */ + function loadImageResources(images, callback) { + var imageResources = {}; + + var checkForCompletion_ = function() { + for (var id in images) { + if (!(id in imageResources)) + return; + } + (callback || function(){})(imageResources); + callback = null; + }; + + for (var id in images) { + var img = document.createElement('img'); + img.src = images[id]; + (function(img, id) { + img.onload = function() { + imageResources[id] = img; + checkForCompletion_(); + }; + img.onerror = function() { + imageResources[id] = null; + checkForCompletion_(); + } + })(img, id); + } + } + + /** + * Loads the first valid image from a FileList (e.g. drag + drop source), as a data URI. This + * method will throw an alert() in case of errors and call back with null. + * + * @param {FileList} fileList The FileList to load. + * @param {Function} callback The callback to fire once image loading is done (or fails). + * @return Returns an object containing 'uri' representing the loaded image. There will also be + * a 'name' field indicating the file name, if one is available. + */ + function loadImageFromFileList(fileList, callback) { + fileList = fileList || []; + + var file = null; + for (var i = 0; i < fileList.length; i++) { + if (fileList[i].type.toLowerCase().match(/^image\/(png|jpeg|jpg)/)) { + file = fileList[i]; + break; + } + } + + if (!file) { + alert('Please use a valid screenshot file (PNG or JPEG format).'); + callback(null); + return; + } + + var fileReader = new FileReader(); + + // Closure to capture the file information. + fileReader.onload = function(e) { + callback({ + uri: e.target.result, + name: file.name + }); + }; + fileReader.onerror = function(e) { + switch(e.target.error.code) { + case e.target.error.NOT_FOUND_ERR: + alert('File not found.'); + break; + case e.target.error.NOT_READABLE_ERR: + alert('File is not readable.'); + break; + case e.target.error.ABORT_ERR: + break; // noop + default: + alert('An error occurred reading this file.'); + } + callback(null); + }; + fileReader.onabort = function(e) { + alert('File read cancelled.'); + callback(null); + }; + + fileReader.readAsDataURL(file); + } + + /** + * Adds a simple version of Canvas.toBlob if toBlob isn't available. + */ + function polyfillCanvasToBlob() { + if (!HTMLCanvasElement.prototype.toBlob && window.Blob) { + HTMLCanvasElement.prototype.toBlob = function(callback, mimeType, quality) { + if (typeof callback != 'function') { + throw new TypeError('Function expected'); + } + var dataURL = this.toDataURL(mimeType, quality); + mimeType = dataURL.split(';')[0].split(':')[1]; + var bs = window.atob(dataURL.split(',')[1]); + if (dataURL == 'data:,' || !bs.length) { + callback(null); + return; + } + for (var ui8arr = new Uint8Array(bs.length), i = 0; i < bs.length; ++i) { + ui8arr[i] = bs.charCodeAt(i); + } + callback(new Blob([ui8arr.buffer /* req'd for Safari */ || ui8arr], {type: mimeType})); + }; + } + } +</script> diff --git a/docs/html/distribute/tools/promote/linking.jd b/docs/html/distribute/tools/promote/linking.jd new file mode 100644 index 0000000..025480b --- /dev/null +++ b/docs/html/distribute/tools/promote/linking.jd @@ -0,0 +1,218 @@ +page.title=Linking to Your Products +page.image=/images/gp-linking-ex-crop.png +meta.tags="promoting" +page.tags="linking" +page.metaDescription=Learn how to build links that take users to your published apps in Google Play from browse or search. + +@jd:body + +<div class="sidebox-wrapper"> +<div class="sidebox"> +<a href="badges.html"> + <img alt="Get it on Google Play" + src="{@docRoot}images/brand/en_app_rgb_wo_45.png" /> +</a> +<p>For a link that includes the Google Play brand icon, check out the <a href="badges.html">Badges</a> page. </p> +</div> +</div> + +<p>Google Play provides several link formats that let you bring users to your +products in the way you want, from Android apps, web pages, ads, reviews, +articles, social media posts, and more.</p> + +<p>The link formats let you:</p> +<ul> +<li>Link to a specific app's <a href="#OpeningDetails">product details page</a></li> +<li>Link to a <a href="#OpeningPublisher">list of all of your apps</a>, or</li> +<li>Link to a <a href="#PerformingSearch">search result</a> of your choice</li> +<li>Link to a <a href="#OpeningCollection">collection</a> on Google Play</li> +</ul> + +<p>If you are linking from an Android app, you can also control whether the link +launches the Play Store application or the browser, which takes the user +to the Google Play website.</p> + +<h2 id="OpeningDetails">Linking to a Product Details Page</h2> + +<p>Use the format below to deep-link users directly to a specific app's product +details page. At the product details page, users can see the app description, +screenshots, reviews and more, and then install it.</p> + +<p>To create the link, you need to know the app's fully qualified <em>package +name</em>, which is declared in the app's <a +href="{@docRoot}guide/topics/manifest/manifest-element.html#package">manifest +file</a>. The package name is also visible in the Developer Console. </p> + +<dl> +<dt><strong>From a web site:</strong></dt> +<dd> +<pre>http://play.google.com/store/apps/details?id=<package_name></pre> +</dd> +<dt><strong>From an Android app:</strong></dt> +<dd> +<pre>market://details?id=<package_name></pre> +</dd> +</dl> + +<p>Here's an example:</p> + +<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> + +<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> + + + +<h2 id="OpeningPublisher">Linking to a Product List</h2> + +<p>Use the format below to link users to a list of apps published by you. The +product list lets users see all of the apps from a specific publisher, with +ratings, editorial badges, and an Install button for each. </p> + +<p>To create the link, you need to know your <em>publisher name</em>, which is +available from the Developer Console. </p> + +<dl> +<dt><strong>From a web site:</strong></dt> +<dd> +<pre>http://play.google.com/store/search?q=pub:<publisher_name></pre> +</dd> +<dt><strong>From an Android app:</strong></dt> +<dd> +<pre>market://search?q=pub:<publisher_name></pre> +</dd> +</dl> + +<p>Here's an example:</p> + +<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> + +<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> + + +<h2 id="PerformingSearch">Linking to a Search Result</h2> + +<p>Use the format below to link users to a search query result on Google Play. +The search result page shows a list of apps (and optionally other content) that +match the query, with ratings, badges, and an Install button for each. </p> + +<p>To create the link, you just need a search query string. If you want the +query to search outside of the Google Play Apps listings, you can remove the +<code>&c=apps</code> part of the link URL.</p> + +<dl> +<dt><strong>From a web site:</strong></dt> +<dd> +<pre>http://play.google.com/store/search?q=<search_query>&c=apps</pre> +</dd> +<dt><strong>From an Android app:</strong></dt> +<dd> +<pre>market://search?q=<seach_query>&c=apps</pre> +</dd> +</dl> + +<p>Here's an example:</p> + +<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> + +<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> + + + +<h2 id="OpeningCollection">Linking to a Collection</h2> + +<p>If your app is featured or appears in one of the Google Play Top charts or +collections, you can use the format below to link users directly to the +collection. The collection shows a ranked list of apps in the collection, with +ratings, short descriptions, and an Install button.</p> + +<dl> +<dt><strong>From a web site:</strong></dt> +<dd> +<pre>http://play.google.com/store/apps/collection/<collection_name></pre> +</dd> +<dt><strong>From an Android app:</strong></dt> +<dd> +<pre>market://apps/collection/<collection_name></pre> +</dd> +</dl> + +<p>Here's an example:</p> + +<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> + +<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> + +<p class="table-caption"><strong>Table 1.</strong> Collections on Google Play</a>.</p> + +<table> +<tr> +<th>Collection</th><th>collection_name</th> +</tr> +<tr><td>Staff Picks (Featured)</td><td>featured</td></tr> +<tr><td>Editor's Choice</td><td>editors_choice</td></tr> +<tr><td>Top Paid</td><td>topselling_paid</td></tr> +<tr><td>Top Free</td><td>topselling_free</td></tr> +<tr><td>Top New Free</td><td>topselling_new_free</td></tr> +<tr><td>Top New Paid</td><td>topselling_new_paid</td></tr> +<tr><td>Top Grossing</td><td>topgrossing</td></tr> +<tr><td>Trending</td><td>movers_shakers</td></tr> +<tr><td>Best Selling in Games</td><td>topselling_paid_game</td></tr> +</table> + + +<h2 id="android-app">Linking from an Android App</h2> + +<p>There are two general formats for links that are accessible to users on +Android devices, The two formats trigger slightly different behaviors on the +device:</p> + +<ul> +<li><code>market://</code> Launches the Play Store app to load the +target page.</li> +<li><code>http://</code> Lets the user choose whether to launch the +Play Store app or the browser to handle the request. If the browser handles the +request, it loads the target page on the Google Play web site.</li> +</ul> + +<p>In general, you should use <code>http://</code> format for links on web pages +and <code>market://</code> for links in Android apps.</p> + +<p>If you want to link to your products from an Android app, create an {@link +android.content.Intent} that opens a Google Play URL, as shown in the example +below.</p> + +<pre> +Intent intent = new Intent(Intent.ACTION_VIEW); +intent.setData(Uri.parse("market://details?id=com.example.android")); +startActivity(intent); +</pre> + + +<h2 id="UriSummary">Summary of URL formats</h2> + +<p>The table below provides a summary of the URIs currently supported by the Google Play (both on +the web and in an Android application), as discussed in the previous sections.</p> + +<table> +<tr> +<th>For this result</th> +<th>Web page link</th> +<th>Android app link</th> +</tr> +<tr> +<td style="width:72px;">Show the product details page for a specific app</td> +<td><code>http://play.google.com/store/apps/details?id=<package_name></code> +<td><code>market://details?id=<package_name></code></td> +</tr> +<tr> +<td>Show apps by a specific publisher</td> +<td><nobr><code>http://play.google.com/store/search?q=pub:<publisher_name></code></nobr></td> +<td><nobr><code>market://search?q=pub:<publisher_name></code></nobr></td> +</tr> +<tr> +<td>Search for apps using a general string query.</td> +<td><code>http://play.google.com/store/search?q=<query></code></td> +<td><code>market://search?q=<query></code></td> +</tr> +</table> + |