diff options
author | Dirk Dougherty <ddougherty@google.com> | 2015-05-13 11:31:26 -0700 |
---|---|---|
committer | Dirk Dougherty <ddougherty@google.com> | 2015-05-13 11:33:26 -0700 |
commit | 40e6ac91665b57cf6e794e731d1b1c7142175abe (patch) | |
tree | 0bad117a5b2d51e0ce795a58c782c87b28908a3f /docs | |
parent | 876677ef2d04545593fd4cd7bb8539fa15e3dc09 (diff) | |
parent | 45fed51720c152c4d41dc86364e5a3c391b251af (diff) | |
download | frameworks_base-40e6ac91665b57cf6e794e731d1b1c7142175abe.zip frameworks_base-40e6ac91665b57cf6e794e731d1b1c7142175abe.tar.gz frameworks_base-40e6ac91665b57cf6e794e731d1b1c7142175abe.tar.bz2 |
resolved conflicts for merge of 45fed517 to mnc-dev
Change-Id: I08e44ee778436e5592e73ced82356f015cbdfe74
Diffstat (limited to 'docs')
36 files changed, 1825 insertions, 973 deletions
diff --git a/docs/html/design/index.jd b/docs/html/design/index.jd index 638f35b..1ffb0a3 100644 --- a/docs/html/design/index.jd +++ b/docs/html/design/index.jd @@ -41,8 +41,12 @@ footer.hide=1 </div> </div> </section> - -<section class="dac-section dac-gray dac-small dac-invert"><div class="wrap"> +<div class="wrap dac-offset-parent"> + <a class="dac-fab dac-scroll-button" data-scroll-button href="#latest"> + <i class="dac-sprite dac-arrow-down-gray"></i> + </a> +</div> +<section class="dac-section dac-gray dac-small dac-invert" id="latest"><div class="wrap"> <h2 class="norule">Latest</h2> <div class="resource-widget resource-flow-layout col-16" data-query="collection:design/landing/latest" diff --git a/docs/html/develop/index.jd b/docs/html/develop/index.jd index 970aded..80e42f2 100644 --- a/docs/html/develop/index.jd +++ b/docs/html/develop/index.jd @@ -9,41 +9,52 @@ tabbedList=1 excludeFromSuggestions=true @jd:body -<section class="dac-expand dac-hero dac-light"> + <section class="dac-expand dac-hero dac-blue"> <div class="wrap"> <div class="cols dac-hero-content"> <div class="col-1of2 col-push-1of2 dac-hero-figure"> <img class="dac-hero-image" src="/images/develop/hero-android-studio-on-device.png"> </div> <div class="col-1of2 col-pull-1of2"> - <h1 class="dac-hero-title">Start!</h1> + <h1 class="dac-hero-title">Get Started with Android</h1> <p class="dac-hero-description"> - Set up your environment and create an app. Build faster with sample projects and templates. + Everything you need to build incredible app experiences on phones and tablets, Wear, TV, and Auto. </p> + +<!--Set up your environment and create an app. Build faster with sample projects and templates.--> </p> - <a class="dac-hero-cta" href="/sdk/index.html"> + <a class="dac-hero-cta" href="{@docRoot}sdk/index.html"> <span class="dac-sprite dac-auto-chevron"></span> Set up Android Studio </a><br> - <a class="dac-hero-cta" href="/training/basics/firstapp/index.html"> + <a class="dac-hero-cta" href="{@docRoot}training/basics/firstapp/index.html"> <span class="dac-sprite dac-auto-chevron"></span> - Make your first app + Build your first app </a><br> - <a class="dac-hero-cta" href="/guide/index.html"> + <a class="dac-hero-cta" href="{@docRoot}guide/index.html"> <span class="dac-sprite dac-auto-chevron"></span> Learn about Android </a><br> + <a class="dac-hero-cta" href="{@docRoot}guide/index.html"> + <span class="dac-sprite dac-auto-chevron"></span> + Sample projects + </a><br> </div> </div> - <div class="dac-section dac-small"> + <!--<div class="dac-section dac-small"> <div class="resource-widget resource-flow-layout col-16" data-query="collection:develop/landing/mainlinks" data-cardSizes="6x2" data-maxResults="6"></div> - </div> + </div>--> </div> </section> +<div class="wrap dac-offset-parent"> + <a class="dac-fab dac-scroll-button" data-scroll-button href="#latest"> + <i class="dac-sprite dac-arrow-down-gray"></i> + </a> +</div> -<section class="dac-section dac-gray dac-small dac-invert"><div class="wrap"> +<section class="dac-section dac-gray dac-small dac-invert" id="latest"><div class="wrap"> <h2 class="norule">Latest</h2> <div class="resource-widget resource-flow-layout col-16" data-query="collection:develop/landing/latest" @@ -51,6 +62,19 @@ excludeFromSuggestions=true data-maxResults="3"></div> </div></section> +<section class="dac-section dac-section-light"><div class="wrap"> + <h1 class="dac-section-title">Tools for building apps</h1> + <div class="dac-section-subtitle"> + Insights into Android's tools and libraries to speed your development. + </div> + <div class="resource-widget resource-flow-layout col-16" + data-query="collection:develop/landing/tools" + data-cardSizes="6x6" + data-maxResults="3" + data-sortOrder="random"></div> + <ul class="dac-section-links"> + </ul> +</div></section> <section class="dac-section dac-light"><div class="wrap"> <h1 class="dac-section-title">Android performance patterns</h1> @@ -69,21 +93,8 @@ excludeFromSuggestions=true </ul> </div></section> -<section class="dac-section dac-section-light"><div class="wrap"> - <h1 class="dac-section-title">Tools for building apps</h1> - <div class="dac-section-subtitle"> - Insights into Android's tools and libraries to speed your development. - </div> - <div class="resource-widget resource-flow-layout col-16" - data-query="collection:develop/landing/tools" - data-cardSizes="6x6" - data-maxResults="3"></div> - <ul class="dac-section-links"> - </ul> -</div></section> - -<section class="dac-section dac-light"><div class="wrap"> - <h1 class="dac-section-title">Ubiquitous computing</h1> +<section class="dac-section dac-gray"><div class="wrap"> + <h1 class="dac-section-title">Ubiquitous computing on Android</h1> <div class="dac-section-subtitle"> Opening up new stuff. </div> @@ -107,9 +118,10 @@ excludeFromSuggestions=true </ul> </div></section> -<section class="dac-section dac-gray"><div class="wrap"> - <h1 class="dac-section-title">Courses</h1> - <div class="dac-section-subtitle">Free online courses from Android experts that bring you step-by-step to building your own apps.</div> +<section class="dac-section dac-light"><div class="wrap"> + <h1 class="dac-section-title">Online Courses</h1> + <div class="dac-section-subtitle">Free online courses from Android + experts that bring you step-by-step to building your own apps.</div> <div class="resource-widget resource-flow-layout col-16" data-query="collection:develop/landing/courses" data-cardSizes="6x6" diff --git a/docs/html/distribute/engage/ads.jd b/docs/html/distribute/engage/ads.jd new file mode 100644 index 0000000..9ca72f3 --- /dev/null +++ b/docs/html/distribute/engage/ads.jd @@ -0,0 +1,58 @@ +page.title=Drive engagement with AdWords Ads +page.metaDescription=Keep users coming back. AdWords offers re-engagement tools to help your app stay top of mind with users. +page.tags="engagement, adwords" +page.image=images/cards/adwords_2x.jpg +@jd:body + +<p>Successful apps keep users coming back again and again. AdWords offers app +re-engagement tools to help your app stay top of mind with users who’ve +already installed it on their phone. AdWords can remind them of key features +and encourage them to try your app again, or help them complete an activity +they didn't know your app could handle.</p> + +<p> + <a href="https://support.google.com/adwords/answer/6032073">Get started with AdWords mobile + app engagement campaigns</a>. +</p> + +<div> + <div class="figure-left" style="width:46%;"> + <h3>From search</h3> + <img src="/images/distribute/promote_ads.png"> + <p class="figure-caption">Add deep links to your app, then bring users straight + to relevant app content when they’re searching.</p> + </div> + <div class="figure-right" style="width:46%;"> + <h3>From apps</h3> + <img src="/images/distribute/promote_ads_inapp.png"> + <p class="figure-caption">Use remarketing and deep links to bring users to just the right + place in your app to re-engage and convert, from other apps and games they love.</p> + </div> +</div> + +<h3 id="tips">Tips</h2> + +<ul> + <li> Track what users do in your app after they click an ad, by installing the + AdWords <a href="https://developers.google.com/app-conversion-tracking/">conversion tracking + SDK</a>. + <li> Advertise a compelling reason for users to re-engage with your app, such as a + reminder or a special offer. + <li> <a href="https://developers.google.com/app-indexing/webmasters/app">Add deep links</a> to + your app and bring users directly to the most relevant and interesting + parts of your app, where they can easily take action. + <li> Re-engage with your app users across the Display Network with remarketing lists +and search with keywords. + <li> Use remarketing lists to target high value users so that you can drive more +conversions in your app. +</ul> + +<h2 id="related_resources">Related resources</h2> + +<div class="resource-widget resource-flow-layout col-13" + data-query="collection:distribute/engage/reengage" + data-sortorder="-timestamp" + data-cardsizes="9x3" + data-maxresults="6"> +</div> + diff --git a/docs/html/distribute/engage/appindexing.jd b/docs/html/distribute/engage/appindexing.jd new file mode 100644 index 0000000..2b8f315 --- /dev/null +++ b/docs/html/distribute/engage/appindexing.jd @@ -0,0 +1,61 @@ +page.title=Bring Users from Google Search +page.metaDescription=Use search to bring your existing users back into your app. +page.image=images/cards/adwords_2x.jpg +page.tags="engagement, search" +@jd:body + +<p>Use the features of Google Search for Android to drive the use of your apps: </p> + +<ul> +<li>Once users have installed your app, search can bring them back with <strong>deep-links</strong> direct to your app. </li> + <li>When users use <strong>voice commands</strong> to ask Google to perform a task, your app can be one of those +completing the task.</li> + +<li>You can also take advantage of <strong>Google Now</strong> to +display cards for event, flight, hotel, and restaurant reservations you notify +to users’ gmail addresses, and bring users back from the email linked to the +card.</li> +</ul> + +<p>Start now by <a href="https://developers.google.com/app-indexing/">indexing your app</a>, then take advantage of <a href="https://developers.google.com/voice-actions/">Voice Actions</a>, the <a href="https://developers.google.com/app-indexing/webmasters/appindexingapi">App Indexing API</a>, and <a href="https://developers.google.com/schemas/now/cards">Google Now Cards</a>.</p> + + +<h2 id="help_users_find_your_information">Help Users Find Your Information</h2> + +<p>Re-engage with your users with deep-links displayed in search results, links +that take users directly to content within your app.</p> + + +<div style="margin-top:1.5em;margin-left:24px"> +<img src="{@docRoot}images/distribute/more-app-engagement.png"> +</div> +<h2 id="empower_users_in_your_app">Empower your users to get things done in your app</h2> + +<p>Brings your users into your app to take action with voice actions such as “Ok +Google, play a song” with the music app of choice, or “Ok Google, search for +hotels in Maui on TripAdvisor” in the TripAdvisor app.</p> + +<div style="margin-top:1em"> +<img src="{@docRoot}images/distribute/music-action.png"> +</div> + + +<h2 id="assist_your_users">Assist your users where and when they need it</h2> + +<div class="figure"> +<img src="https://developers.google.com/schemas/images/now_eventconfirmation.png"> +</div> + +<p>Inform your users of their reservations with cards created from structured data +markup delivered in Gmail notifications. Cards also lead users quickly back to +your email message, for further engagement.</p> + +<h2 style="clear:both" id="related-resources">Related Resources</h2> + +<div class="resource-widget resource-flow-layout col-13" + data-query="collection:distribute/engage/appindexing" + data-sortOrder="-timestamp" + data-cardSizes="9x3" + data-maxResults="6"></div> + + diff --git a/docs/html/distribute/engage/deep-linking.jd b/docs/html/distribute/engage/deep-linking.jd index ea1f1de..b8d974c 100644 --- a/docs/html/distribute/engage/deep-linking.jd +++ b/docs/html/distribute/engage/deep-linking.jd @@ -26,27 +26,26 @@ page.image=images/cards/google-search_2x.png before accessing the resource. </p> -<div style="padding:2em, auto;width:550px;"> - <div style="float:right; width:260px; padding-left:1em;"> - <img src="{@docRoot}images/gp-engage-5.jpg" class="border-img"> - <p class="img-caption"> + +<div style="inline-block"> + +<div class="col-5"> + <img src="{@docRoot}images/gp-engage-5.jpg"> + <p class="figure-caption"> G+ Post with Deep Link to Buy </p> - </div> +</div> - <div style="width:260px;float:left;"> - <img src="{@docRoot}images/gp-engage-6.jpg" class="border-img"> - <p class="img-caption"> +<div class="col-5"> + <img src="{@docRoot}images/gp-engage-6.jpg"> + <p class="figure-caption"> Purchase page within app </p> - </div> </div> - -<div class="headerLine"> -<h2>Deep Linking from Google Search — App Indexing</h2> </div> +<h2 style="clear:both">Deep Linking from Google Search — App Indexing</h2> <div style="float:right;"> <img src="/images/gp-listing-4.jpg" style="padding-top:1em;padding-left:2em;"> @@ -65,15 +64,15 @@ page.image=images/cards/google-search_2x.png content</a>. </p> -<div class="clearfloat" style="margin-top:2em;"></div> -<div style="float:right;width:340px;padding-left:2em;"> - <img src="/images/gp-ads-linking2.jpg" style="padding-top:1em;"> -</div> -<div class="headerLine "> -<h2>Deep Linking from Google Ads</h2> +<h2 style="clear:both" style="padding-top:2em">Deep Linking from Google Ads</h2> + + +<div class="col-5" style="float:right"> + <img src="{@docRoot}images/gp-ads-linking2.jpg" > </div> + <p> Ads can remind users about the apps they already have. </p> diff --git a/docs/html/distribute/engage/engage_toc.cs b/docs/html/distribute/engage/engage_toc.cs index eb176f9..4639d55 100644 --- a/docs/html/distribute/engage/engage_toc.cs +++ b/docs/html/distribute/engage/engage_toc.cs @@ -31,18 +31,37 @@ </li> <li class="nav-section"> <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs - var:toroot?>distribute/engage/game-services.html"> - <span class="en">Encourage Competition</span></a> + var:toroot?>distribute/engage/ads.html"> + <span class="en">Drive engagement with Ads</span></a> </div> </li> <li class="nav-section"> <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs + var:toroot?>distribute/engage/appindexing.html"> + <span class="en">Bring Users from Search</span></a> + </div> + </li> + <li class="nav-section"> + <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs + var:toroot?>distribute/engage/intents.html"> + <span class="en">Use the Power of Intents</span></a> + </div> + </li> + + <li class="nav-section"> + <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/engage/analytics.html"> <span class="en">Understand User Behavior</span></a> </div> </li> <li class="nav-section"> <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs + var:toroot?>distribute/engage/game-services.html"> + <span class="en">Encourage Competition</span></a> + </div> + </li> + <li class="nav-section"> + <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/engage/app-updates.html"> <span class="en">Update Regularly</span></a> </div> diff --git a/docs/html/distribute/engage/index.jd b/docs/html/distribute/engage/index.jd index 2b103c3..a47e004 100644 --- a/docs/html/distribute/engage/index.jd +++ b/docs/html/distribute/engage/index.jd @@ -1,5 +1,5 @@ page.title=Engage & Retain Users -page.metaDescription=Engaging and retaining active users is the key to success. Here are some resources to help you build an active user base. +page.metaDescription=Engaging and retaining active users are the keys to success. Here are some resources to help you build an active user base. section.landing=true nonavpage=true @@ -15,8 +15,13 @@ nonavpage=true <div class="resource-widget resource-flow-layout landing col-16" data-query="collection:distribute/engagelanding" - data-cardSizes="9x6,9x6,6x6,6x6,6x6,9x6,9x6,6x6,6x6,6x6" - data-maxResults="10"> + data-cardSizes="6x6" + data-maxResults="6"> + </div> + <div class="resource-widget resource-flow-layout landing col-16" + data-query="collection:distribute/engagelanding" + data-cardSizes="6x2" + data-maxResults="20"> </div> <h3>Related Resources</h3> diff --git a/docs/html/distribute/engage/intents.jd b/docs/html/distribute/engage/intents.jd new file mode 100644 index 0000000..0371ac4 --- /dev/null +++ b/docs/html/distribute/engage/intents.jd @@ -0,0 +1,39 @@ +page.title=Drive On-Device Discovery through Android Intents +page.metaDescription=Make your app available to users as they perform tasks in other apps through Intents. +page.tags="engagement" +@jd:body + +<p>Let the user choose <em>your app</em> to handle specific tasks from another app, +such as sharing a picture, sending a message, or playing music. You can do this though +Android's open Intents system. By adding Intent filters for the tasks your app can handle, +you make it easy for the user to access your app’s features from other apps and from voice +commands in Google Now.</p> + +<img src="{@docRoot}images/distribute/engage-intents.png"> + +<p>By declaring Intent Filters in your app, it informs the Android OS about the +actions it can perform for other apps. And in addition to making it easy for +your users to make full use of your app’s features, it can help them discover +features they didn’t know it supported.</p> + +<p>To learn about all the ways you can use Intents, check out <a +href="{@docRoot}guide/components/intents-filters.html">Intents and Intent Filters</a>.</p> + +<h2 id=tips>Tips</h2> + +<ul> + <li> Identify and package any features your app can offer to other apps. + <li> Use the "view" intent to give users the option to open any links to your +website within your app instead. + <li> Familiarize yourself with actions commonly accomplished with intents, such as +sharing, so that you can focus on your app's core functionality and outsource +common actions. +</ul> + +<h2 style="clear:both" id="related-resources">Related Resources</h2> + +<div class="resource-widget resource-flow-layout col-13" + data-query="collection:distribute/engage/intents" + data-sortOrder="-timestamp" + data-cardSizes="9x3" + data-maxResults="6"></div> diff --git a/docs/html/distribute/index.jd b/docs/html/distribute/index.jd index c49fe3e..bff8df6 100644 --- a/docs/html/distribute/index.jd +++ b/docs/html/distribute/index.jd @@ -10,7 +10,13 @@ page.metaDescription=The most visited store in the world for Android apps. Cloud <div class="dac-hero-carousel" data-carousel-query="collection:distribute/landing/carousel"> </div> -<section class="dac-section dac-gray dac-small dac-invert"><div class="wrap"> +<div class="wrap dac-offset-parent"> + <a class="dac-fab dac-scroll-button" data-scroll-button href="#latest"> + <i class="dac-sprite dac-arrow-down-gray"></i> + </a> +</div> + +<section class="dac-section dac-gray dac-small dac-invert" id="latest"><div class="wrap"> <h2 class="norule">Latest</h2> <div class="resource-widget resource-flow-layout col-16" data-query="type:youtube+tag:googleplay+tag:developerstory+tag:featured, type:blog+tag:googleplay+tag:distribute+tag:featured" diff --git a/docs/html/distribute/monetize/ads.jd b/docs/html/distribute/monetize/ads.jd index b5c5f4a..8f6c8b0 100644 --- a/docs/html/distribute/monetize/ads.jd +++ b/docs/html/distribute/monetize/ads.jd @@ -1,138 +1,129 @@ -page.title=Monetize with Ads -page.metaDescription=Ads are a quick and easy way to incorporate a monetization option into both your free and paid apps. -page.tags="monetizing", "free", "freemium", "ads" -page.image=/distribute/images/advertising.jpg - +page.title=Earn Revenue from AdMob Ads +page.metaDescription=Gain insights about your users, drive more in-app purchases, and maximize your ad revenue. +page.tags="monetizing", "ads", "admob", "ads" +page.image=distribute/images/advertising.jpg @jd:body <div class="figure"> <img src="{@docRoot}distribute/images/advertising.jpg" style="width:460px;"> </div> -<p> - Ads can be a quick and easy way to earn more from your <a href= - "{@docRoot}distribute/monetize/freemium.html">freemium</a>, <a href= - "{@docRoot}distribute/monetize/premium.html">premium</a>, and <a href= - "{@docRoot}distribute/monetize/subscriptions.html">subscription</a> apps. - AdMob and the Google Mobile Ads SDK let you add advertising to your apps with - just a few lines of code. -</p> - -<p> - The question is: which model gets the best results for your app? Google's ad - tools are made to help you figure out what combination works best for both - your audience and your bottom line. </p> - -<p>Start by linking your AdMob and Google - Analytics accounts to get better insights and more earning power: for - instance, AdMob can promote in-app purchases to the people who buy them most - often, while showing income-generating ads to those less likely to buy right - now. -</p> - -<p> - Using <a href= - "http://www.google.com/ads/admob/monetize.html#subid=us-en-et-dac">AdMob</a> - and the <a href="{@docRoot}google/play-services/ads.html">Google Mobile Ads - SDK</a> included in Google Play Services, you’re able to add advertising into - your apps, with just a few lines of code. -</p> - -<p> - When including ads in your apps you should consider: -</p> +<p>Ads are an effective and easy way to earn revenue from your apps. AdMob brings +together best-in-class technology in a single ad platform for your app, so you +can gain insights about your users, drive more in-app purchases, and maximize +your ad revenue. You won’t need to rely on a combination of tools or use +precious development resources to build your own solution.</p> + +<p>Why choose AdMob?</p> <ul> - <li> - <p> - <strong>Placement within your apps</strong> — Well-placed ads make - it more likely that users will click through and convert. Poorly-placed - ads lead to lower click-through rates, and even poor ratings and users - abandoning your apps. Our <a href= - "{@docRoot}training/monetization/ads-and-ux.html">developer training</a> - on using ads shows some of the best ways to place ads. - </p> - </li> - - <li> - <p> - <strong>Ad formats</strong> — Every app offers a different type of - experience for users, so it’s important that your ad formats match that - experience. While banner ads may work well for a flashlight utility app, - an immersive gaming app may benefit more from a video interstitial. - Mismatched ad formats can make users unhappy and leave money on the - table. - </p> - </li> - - <li> - <p> - <strong>Maximizing your performance</strong> — Make sure you’re - optimizing your advertising revenue by maximizing your CPMs and fill - rate. Ad providers often cite their very high CPMs but don't mention low - fill rates that can severely decrease your effective CPM. Be sure to look - at both of these figures. Consider using a <a href= - "https://support.google.com/admob/v2/answer/3063564?hl=en&ref_topic=3063091#subid=us-en-et-dac"> - mediation</a> solution if you’d like to use multiple ad providers in your - apps. Look for solutions that offer yield management or <a href= - "https://support.google.com/admob/v2/answer/3379794?hl=en&ref_topic=3379793#subid=us-en-et-dac"> - network optimization</a> features to serve the highest paying ad for each - impression. - </p> - </li> - - <li> - <p> - <strong>Exercising control options</strong> — A variety of ads may - show up within your app. It may make sense to <a href= - "https://support.google.com/admob/v2/answer/3150235?hl=enl#subid=us-en-et-dac"> - block</a> certain of those advertisements from appearing, depending on - your goals and the type of experience you want to provide. Some - developers, for instance, don’t want ads for apps in their same category - showing to their users, while others don’t mind at all. - </p> - </li> - - <li> - <p> - <strong>Cross promoting your other apps</strong> — Ads can do more - than earn revenue. Consider running <a href= - "https://support.google.com/admob/v2/answer/3210452?hl=en#subid=us-en-et-dac"> - house ads</a> within your apps to promote other apps in your portfolio. - When you launch a new app, this kind of promotion is a free and easy way - to attract new users quickly. - </p> - </li> + <li> Over 650,000 apps use AdMob + <li> $1 billion+ paid to developers in the last 2 years + <li> Fast, reliable payment in local currencies + <li> High CPMs and the best fill rates + <li> Industry-leading mediation platform </ul> -<p> - Don't forget that paid channels like AdWords and YouTube can help you cast a - wider net by reaching targeted audiences outside the app ecosystem. They're a - great way to find new users at a price that you control. <a href= - "https://support.google.com/adwords/answer/2549053">Learn more</a>. -</p> +<p><a href="http://www.google.com/ads/admob/#subid=us-en-et-dac">Sign-up for AdMob</a> +today and start showing ads by integrating the <a +href="https://developers.google.com/mobile-ads-sdk/download">Google Mobile Ads SDK</a> +in your app with a few lines of code.</p> + +<h2 id="key_features">Key features</h2> + +<div style="display:inline-block"> +<h3 id="maximize_your_ad_revenue">Maximize your ad revenue</h3> + +<div class="col-4"> + <h4 id="maximize_earnings">Maximize earnings</h4> + <p>Earn more with our industry-leading ad service, which includes <a href= + "https://support.google.com/admob/answer/3063564">free mediation</a> to + automatically improve your earnings, and access to all of Google’s advertiser + demand from AdMob, AdWords, and the DoubleClick Ad Exchange.</p> +</div> + +<div class="col-4"> + <h4 id="get_paid_fast">Get paid fast</h4> + <p>Get paid in local currencies quickly and reliably, with no wire fees charged by + AdMob.</p> +</div> + +<div class="col-4"> + <h4 id="easy_and_free">Easy and free</h4> + <p>The SDK can be installed quickly, and there are no standard fees for using the + platform.</p> +</div> +</div> + +<div style="display:inline-block"> +<h3 id="grow_your_business_with_a_trusted_partner">Grow your business with a trusted partner</h3> + +<div class="col-6"> + <h4 id="powered_by_googles_ad_technology">Powered by Google’s ad technology</h4> + <p>For over a decade, Google has helped millions of developers grow their digital + businesses.</p> +</div> + +<div class="col-6"> +<h4 id="auto_updates_on_google_play">Auto updates on Google Play</h4> +<p>AdMob’s integration with Google Play services pushes automatic performance + improvements to Android apps without additional SDK changes.</p> +</div> +</div> + +<div style="display:inline-block"> +<h3 id="drive_more_in-app_purchases_and_downloads">Drive more in-app purchases and downloads</h3> + +<div class="col-6"> +<h4 id="sell_more_in-app_purchases">Sell more in-app purchases</h4> +<p>Earn more revenue by intelligently promoting your in-app purchases to the users +most likely to buy them.</p> +</div> + +<div class="col-6"> +<h4 id="promote_your_apps_for_free">Promote your apps for free</h4> +<p>Cross-sell your other apps (or your friend’s apps) to your existing users, +using free AdMob <a href="https://support.google.com/admob/answer/3210452">house ads</a>.</p> +</div> +</div> + +<div style="display:inline-block"> +<h3 id="drive_more_in-app_purchases_and_downloads">Drive more in-app purchases and downloads</h3> -<p> - To start monetizing with ads, sign up for AdMob and integrate the Google - Mobile Ads SDK into your apps. If you also need to manage direct deals with - advertisers, consider using DoubleClick for Publishers Small Business. -</p> +<div class="col-6"> +<h4 id="analytics_for_apps">Analytics for apps</h4> +<p>Analyze your app’s performance from within AdMob with Google Analytics. +Discover where people are downloading your app, and the features they use the +most in real time.</p> +</div> + +<div class="col-6"> +<h4 id="flow_visualization_reports">Flow visualization reports</h4> +<p>In Analytics, see how people are navigating through your app with graphical +<a href="https://support.google.com/analytics/answer/2519986">flow reports</a>. +View the path they take to making a purchase, and the point where they exit +the app, plus much more.</p> +</div> +</div> -<p> - To start monetizing with ads sign up for <a href= - "http://www.google.com/ads/admob/#subid=us-en-et-dac">AdMob</a> and integrate - the <a href="https://developers.google.com/mobile-ads-sdk/download">Google - Mobile Ads SDK</a> into your apps. If you also need to manage direct deals - with advertisers, consider using <a href= - "http://www.google.com/doubleclick/publishers/small-business/index.html#subid=us-en-et-dac"> - DoubleClick for Publishers Small Business</a>. -</p> +<h2 id=tips>Tips</h2> + +<ul> + <li> Place ads wisely, they shouldn't be too intrusive but still need to be clearly +visible to attract clickthroughs. + <li> Use banner, interstitial, and other ad formats appropriately. + <li> Make use of targeting features to match ads with your users and your app. + <li> Remember that ads form part of your app and must match its age rating. + <li> Exercise control options sensibly, don't get carried away excluding potentially +competing ads at the expense of revenue. +</ul> + -<div class="headerLine"><h2 id="related-resources">Related resources</h2></div> +<h2 id=related_resources>Related resources</h2> <div class="resource-widget resource-flow-layout col-13" - data-query="collection:distribute/monetize/advertising" + data-query="collection:distribute/monetize/admob" data-sortOrder="-timestamp" data-cardSizes="9x3" data-maxResults="6"></div> diff --git a/docs/html/distribute/monetize/monetize_toc.cs b/docs/html/distribute/monetize/monetize_toc.cs index 8211689..aa1bdd6 100644 --- a/docs/html/distribute/monetize/monetize_toc.cs +++ b/docs/html/distribute/monetize/monetize_toc.cs @@ -24,7 +24,7 @@ </li> <li class="nav-section"> <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/monetize/ads.html"> - <span class="en">Ads</span> + <span class="en">AdMob Ads</span> </a> </div> </li> diff --git a/docs/html/distribute/users/appindexing.jd b/docs/html/distribute/users/appindexing.jd new file mode 100644 index 0000000..6a3fec6 --- /dev/null +++ b/docs/html/distribute/users/appindexing.jd @@ -0,0 +1,46 @@ +page.title=Drive installs from Google Search +page.metaDescription=Surface the content of your apps in Google Search and link it to app installs. +meta.tags="getusers", "search", "appindexing" +page.image=images/cards/google-search_2x.png +@jd:body + +<p>Google Search now helps users discover your app, with App Indexing. When users +search with Google on their Android device the results will include details of +relevant, indexed apps. The search results will include an install button that +takes users to your app in the Google Play store. And when your app is +installed, the user will be taken straight to the right content within it.</p> + +<div class="figure-left"> +<img src="{@docRoot}images/distribute/appindexing.gif"> +</div> + +<p>This free service expands your opportunities to turn the investment you’ve made +in creating an outstanding app or game into installs. </p> + +<p>Start now by adding deep linking support to your app, verifying your app’s +official website, and defining deep links. To learn how, check out these <a +href="https://developers.google.com/app-indexing/webmasters/details">instructions</a>. </p> + +<p>Once your app is index, links to its content will join the 30 billion app index +links already available to Google Search.</p> + +<h2 id=tips>Tips</h2> + +<ul> + <li> App Indexing will also be used as a ranking signal for all users on Android, +regardless of whether they have your app installed or not. + <li> App Indexing also helps drive use of your app — when your app is installed on a +user’s device, search results will include deep links to your app that bring +the user straight to the relevant app content. + <li> Use the App Indexing API to help users discover relevant content in your app +before they complete a query with auto-completions. +</ul> + +<h2 id=related_resources>Related resources</h2> + +<div class="resource-widget resource-flow-layout col-13" + data-query="collection:distribute/users/appindexing" + data-sortOrder="-timestamp" + data-cardSizes="9x3" + data-maxResults="6"></div> + diff --git a/docs/html/distribute/users/promote-with-ads.jd b/docs/html/distribute/users/promote-with-ads.jd index c1d79fc..d71b8c9 100644 --- a/docs/html/distribute/users/promote-with-ads.jd +++ b/docs/html/distribute/users/promote-with-ads.jd @@ -1,43 +1,126 @@ page.title=Promote Your App with Ads -page.metaDescription=Promote your app through AdMob, AdWords, and YouTube to find new users at the right moment. +page.metaDescription=Promote your app with AdWords to find new users at the right moment. page.image=images/cards/adwords_2x.jpg -page.tags="users, ads, analytics" - +page.tags="users, ads, adwords" @jd:body -<p> - AdMob is Google's advertising platform for mobile apps. You can use it to - monetize your app and promote your apps, and you can link your Google - Analytics account to AdMob so you can analyze your apps — all in one - place. -</p> - -<p> - <a href="http://www.google.com/ads/admob/">AdMob</a> is the largest mobile ad - app network. But you get more than just massive scale: AdMob will soon help - you find the right users in related apps. If your app is for bicycling, AdMob - can promote your app on other fitness and cycling-related apps worldwide. - <a href= - "https://apps.admob.com/admob/signup?subid=us-en-et-dac&_adc=ww-ww-et-admob2&hl=en"> - Sign up for AdMob</a>. -</p> - -<p> - AdMob also offers new solutions to help you achieve app-related goals such as - downloads, re-engagement and in-app purchases using Google search and the - Google Display Network. These solutions include streamlined campaign creation - flows and tools to track performance across the entire app lifecycle. - <a href="https://support.google.com/adwords/answer/2549053?hl=en">Learn - More</a>. -</p> -<div style="margin-top:2em;"> - <img src="{@docRoot}images/gp-ads-console.jpg"> +<p>Users have a huge amount of choice when it comes to which apps they install and +use, so it’s important to actively find new ways to promote your app and drive +ongoing engagement. AdWords is a powerful and effective way to do both.</p> + + +<h2 id=drive_installs>Drive installs</h2> + +<p><a href="http://adwords.google.com">AdWords</a> promotes your app to interested users where they spend time on phones and +tablets – with app install ads on Google Search, YouTube, Gmail, and within +apps and across the web on the Google Display Network. AdWords is a powerful +way to scale app promotion across Google networks and find customers that are +most likely to install your app. </p> + +<p><a href="https://support.google.com/adwords/answer/6032059">Get started with AdWords app install ads</a>.</p> + +<div style="display:inline-block"> + <div class="figure-left" style="width:40%;"> + <h3>From Google Play</h3> + <img src="/images/distribute/promote_ads_play.png"> + <p class="figure-caption">Search ads on Google Play are still undergoing testing and not yet available to +buy. <a href="http://android-developers.blogspot.com/2015/02/a-new-way-to-promote-your-app-on-google.html">Find out more</a>.</p> + </div> + <div class="figure-right" style="width:40%;"> + <h3>From apps</h3> + <img src="/images/distribute/promote_ads_search.png"> + <p class="figure-caption">Connect with users as they search for content and services provided by your +app.</p> + </div> </div> -<div class="headerLine"> -<h2 id="related-resources">Related Resources</h2> +<div style="display:inline-block"> + <div class="figure-left" style="width:40%;"> + <h3>From YouTube</h3> + <img src="/images/distribute/promote_ads_youtube.png"> + <p class="figure-caption">Promote your app when users are watching related videos.</p> + </div> + <div class="figure-right" style="width:40%;"> + <h3>From apps</h3> + <img src="/images/distribute/promote_ads_apps.png"> + <p class="figure-caption">Reach users while they’re engaged with apps and games across the AdMob network.</p> + </div> +</div> + +<div style="display:inline-block"> + <div class="figure-left" style="width:40%;"> + <h3>From the web</h3> + <img src="/images/distribute/promote_ads_web.png"> + <p class="figure-caption">Reach users while they’re engaged with websites across the Google Display Network.</p> + </div> + <div class="figure-right" style="width:40%;"> + <h3>From Gmail</h3> + <img src="/images/distribute/promote_ads_gmail.png"> + <p class="figure-caption">Promote your app while users communicate and get things done in Gmail.</p> + </div> +</div> + +<h3>Tips</h3> + +<ul> + <li> Estimate how much an app user is worth to your business, so that you can work +out an appropriate cost-per-install that you’re willing to pay. + <li> Ensure that your ads and Play Store listing are compelling and clearly describe +your app’s value. + <li> Check that you’re accurately tracking and attributing installs by installing +the AdWords <a href="https://developers.google.com/app-conversion-tracking/">conversion tracking SDK</a>. + <li> Promote your app broadly across display, search, and video to reach even more +potential users and drive a higher volume of installs. + <li> Start with broader targeting and then fine tune your bidding once you’ve +assessed your campaign results. + <li> Use Conversion Optimizer to automate your bidding so that your ads target users +who are most likely to install your app. + <li> Use Conversion Optimizer for in-app buyers to automate your bidding so that +your ads target high value users who are most likely to make purchases in your +app. +</ul> + + +<h2 id=engage_with_users>Engage with users</h2> + +<p>Getting a user to install an app is one thing, but you'll also want them to +open it regularly. AdWords offers app re-engagement tools to help your app stay +in mind with users who’ve already installed it on their phone. AdWords can +remind them of key features and encourage them to try your app again, or help +them complete an activity they didn't know your app could handle.</p> + +<div> + <div class="figure-left" style="width:46%;"> + <h3>From search</h3> + <img src="/images/distribute/promote_ads.png"> + <p class="figure-caption">Add deep links to your app, then bring users straight + to relevant app content when they’re searching.</p> + </div> + <div class="figure-right" style="width:46%;"> + <h3>From apps</h3> + <img src="/images/distribute/promote_ads_inapp.png"> + <p class="figure-caption">Use remarketing and deep links to bring users to just the right + place in your app to re-engage and convert, from other apps and games they love.</p> + </div> </div> +<h3>Tips</h3> + +<ul> + <li> Track what users do in your app after they’ve clicked an ad, by installing the +AdWords <a href="https://developers.google.com/app-conversion-tracking/">conversion tracking SDK</a>. + <li> Advertise a compelling reason for users to re-engage with your app (such as a +reminder or a special offer). + <li> <a href="https://developers.google.com/app-indexing/webmasters/app">Add deep links</a> to your app that’ll take users directly to the parts of your app that will be +most relevant and interesting to them, where they can easily take action. + <li> Re-engage your app users across the display network with remarketing lists and +search with keywords. + <li> Use remarketing lists to target high value users so that you can drive more +conversions in your app. +</ul> + +<h2 id="related-resources">Related Resources</h2> + <div class="resource-widget resource-flow-layout col-13" data-query="collection:distribute/users/promotewithads" data-sortOrder="-timestamp" diff --git a/docs/html/distribute/users/users_toc.cs b/docs/html/distribute/users/users_toc.cs index edfa874..2e796c8 100644 --- a/docs/html/distribute/users/users_toc.cs +++ b/docs/html/distribute/users/users_toc.cs @@ -11,26 +11,32 @@ </div> </li> <li class="nav-section"> - <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/users/build-buzz.html"> - <span class="en">Build Buzz</span> + <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/users/expand-to-new-markets.html"> + <span class="en">Expand to New Markets</span> </a> </div> </li> <li class="nav-section"> - <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/users/build-community.html"> - <span class="en">Build Community</span> + <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/users/promote-with-ads.html"> + <span class="en">Promote with Ads</span> </a> </div> </li> <li class="nav-section"> - <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/users/expand-to-new-markets.html"> - <span class="en">Expand to New Markets</span> + <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/users/appindexing.html"> + <span class="en">Drive Installs through Search</span> </a> </div> </li> <li class="nav-section"> - <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/users/promote-with-ads.html"> - <span class="en">Promote with Ads</span> + <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/users/build-buzz.html"> + <span class="en">Build Buzz</span> + </a> + </div> + </li> + <li class="nav-section"> + <div class="nav-section-header empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/users/build-community.html"> + <span class="en">Build Community</span> </a> </div> </li> diff --git a/docs/html/images/distribute/appindexing.gif b/docs/html/images/distribute/appindexing.gif Binary files differnew file mode 100644 index 0000000..6015d14 --- /dev/null +++ b/docs/html/images/distribute/appindexing.gif diff --git a/docs/html/images/distribute/engage-intents.png b/docs/html/images/distribute/engage-intents.png Binary files differnew file mode 100644 index 0000000..2889c08 --- /dev/null +++ b/docs/html/images/distribute/engage-intents.png diff --git a/docs/html/images/distribute/more-app-engagement.png b/docs/html/images/distribute/more-app-engagement.png Binary files differnew file mode 100644 index 0000000..31cbede --- /dev/null +++ b/docs/html/images/distribute/more-app-engagement.png diff --git a/docs/html/images/distribute/music-action.png b/docs/html/images/distribute/music-action.png Binary files differnew file mode 100644 index 0000000..24d6dc8 --- /dev/null +++ b/docs/html/images/distribute/music-action.png diff --git a/docs/html/images/distribute/promote-ads-apps.png b/docs/html/images/distribute/promote-ads-apps.png Binary files differnew file mode 100644 index 0000000..9009a37 --- /dev/null +++ b/docs/html/images/distribute/promote-ads-apps.png diff --git a/docs/html/images/distribute/promote-ads-web.png b/docs/html/images/distribute/promote-ads-web.png Binary files differnew file mode 100644 index 0000000..2f9630e --- /dev/null +++ b/docs/html/images/distribute/promote-ads-web.png diff --git a/docs/html/images/distribute/promote_ads.png b/docs/html/images/distribute/promote_ads.png Binary files differnew file mode 100644 index 0000000..38517aa --- /dev/null +++ b/docs/html/images/distribute/promote_ads.png diff --git a/docs/html/images/distribute/promote_ads_apps.png b/docs/html/images/distribute/promote_ads_apps.png Binary files differnew file mode 100644 index 0000000..2f57865 --- /dev/null +++ b/docs/html/images/distribute/promote_ads_apps.png diff --git a/docs/html/images/distribute/promote_ads_gmail.png b/docs/html/images/distribute/promote_ads_gmail.png Binary files differnew file mode 100644 index 0000000..1d21b4a --- /dev/null +++ b/docs/html/images/distribute/promote_ads_gmail.png diff --git a/docs/html/images/distribute/promote_ads_inapp.png b/docs/html/images/distribute/promote_ads_inapp.png Binary files differnew file mode 100644 index 0000000..8aeee57 --- /dev/null +++ b/docs/html/images/distribute/promote_ads_inapp.png diff --git a/docs/html/images/distribute/promote_ads_play.png b/docs/html/images/distribute/promote_ads_play.png Binary files differnew file mode 100644 index 0000000..1cf51b2 --- /dev/null +++ b/docs/html/images/distribute/promote_ads_play.png diff --git a/docs/html/images/distribute/promote_ads_search.png b/docs/html/images/distribute/promote_ads_search.png Binary files differnew file mode 100644 index 0000000..27c0b38 --- /dev/null +++ b/docs/html/images/distribute/promote_ads_search.png diff --git a/docs/html/images/distribute/promote_ads_web.png b/docs/html/images/distribute/promote_ads_web.png Binary files differnew file mode 100644 index 0000000..588a3d4 --- /dev/null +++ b/docs/html/images/distribute/promote_ads_web.png diff --git a/docs/html/images/distribute/promote_ads_youtube.png b/docs/html/images/distribute/promote_ads_youtube.png Binary files differnew file mode 100644 index 0000000..e88a796 --- /dev/null +++ b/docs/html/images/distribute/promote_ads_youtube.png diff --git a/docs/html/index.jd b/docs/html/index.jd index cfbe7b6..ffc6769 100644 --- a/docs/html/index.jd +++ b/docs/html/index.jd @@ -10,7 +10,10 @@ page.customHeadTag=<meta name="google-site-verification" content="sa-bIAI6GKvct3 </div> <div class="actions-bar dac-expand dac-invert"> - <div class="wrap"> + <div class="wrap dac-offset-parent"> + <a class="dac-fab dac-scroll-button" data-scroll-button href="#build-apps"> + <i class="dac-sprite dac-arrow-down-gray"></i> + </a> <div class="actions"> <div><a href="{@docRoot}sdk/index.html"> <span class="dac-sprite dac-auto-chevron-large"></span> @@ -32,7 +35,7 @@ page.customHeadTag=<meta name="google-site-verification" content="sa-bIAI6GKvct3 </div><!-- end .wrap --> </div><!-- end .actions-bar --> -<section class="dac-section dac-section-light"><div class="wrap"> +<section class="dac-section dac-section-light" id="build-apps"><div class="wrap"> <h1 class="dac-section-title">Build Beautiful Apps</h1> <div class="dac-section-subtitle"> See what’s new or find the resources to get you started with designing and developing for Android. diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js index 834eac1..c89b310 100644 --- a/docs/html/jd_collections.js +++ b/docs/html/jd_collections.js @@ -104,15 +104,18 @@ var RESOURCE_COLLECTIONS = { "resources": [ "https://www.youtube.com/watch?v=AK38PJZmIW8&list=PLWz5rJ2EKKc-kIrPiq098QH9dOle-fLef", "https://www.youtube.com/watch?v=6K_jxccHv5M&index=1&list=PLOU2XLYxmsILFBfx66ens76VMLMEPJAB0", - "https://www.youtube.com/watch?v=KNKGM4ss5Sc&index=4&list=PLWz5rJ2EKKc9BdE_PSLNIGjXXr3h_orXM" + "https://www.youtube.com/watch?v=ctiaVxgclsg&list=PLWz5rJ2EKKc9BdE_PSLNIGjXXr3h_orXM" ] }, "develop/landing/tools": { "title": "", "resources": [ - "https://www.youtube.com/watch?v=K2dodTXARqc&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ&index=1", - "https://www.youtube.com/watch?v=3PIc-DuEU2s&index=1&list=PLWz5rJ2EKKc9e0d55YHgJFHXNZbGHEXJX", - "https://www.youtube.com/watch?v=FOn64iqlphk&index=1&list=PLWz5rJ2EKKc9Qk1_iCZNbBp6adYnJf9Vf" + "https://www.youtube.com/watch?v=K2dodTXARqc&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ", + "https://www.youtube.com/watch?v=3PIc-DuEU2s&list=PLWz5rJ2EKKc9e0d55YHgJFHXNZbGHEXJX", + "https://www.youtube.com/watch?v=cD7NPxuuXYY&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ", + "https://www.youtube.com/watch?v=JLLnhwtDoHw&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ", + "https://www.youtube.com/watch?v=2I6fuD20qlY&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ", + "https://www.youtube.com/watch?v=5Be2mJzP-Uw&list=PLWz5rJ2EKKc9e0d55YHgJFHXNZbGHEXJX" ] }, "develop/landing/courses": { @@ -123,6 +126,14 @@ var RESOURCE_COLLECTIONS = { "https://www.udacity.com/course/android-performance--ud825" ] }, + "preview/landing/herolinks": { + "title": "", + "resources": [ + "https://www.udacity.com/course/ux-design-for-mobile-developers--ud849", + "https://www.udacity.com/course/developing-android-apps--ud853", + "https://www.udacity.com/course/android-performance--ud825" + ] + }, "distribute/landing/carousel": { "title": "", "resources": [ @@ -143,12 +154,12 @@ var RESOURCE_COLLECTIONS = { "distribute/landing/more": { "title": "", "resources": [ - "distribute/users/promote-with-ads.html", - "distribute/monetize/ads.html", - "distribute/analyze/index.html", - "distribute/engage/deep-linking.html", - "distribute/engage/easy-signin.html", - "https://cloud.google.com/docs/" + "distribute/users/promote-with-ads.html", + "distribute/monetize/ads.html", + "distribute/analyze/index.html", + "distribute/engage/deep-linking.html", + "distribute/engage/easy-signin.html", + "https://cloud.google.com/docs/" ] }, "distribute/edu/videos/stories": { @@ -271,10 +282,11 @@ var RESOURCE_COLLECTIONS = { "resources": [ "distribute/users/know-your-user.html", "distribute/users/your-listing.html", - "distribute/users/build-buzz.html", - "distribute/users/build-community.html", "distribute/users/expand-to-new-markets.html", - "distribute/users/promote-with-ads.html" + "distribute/users/promote-with-ads.html", + "distribute/users/appindexing.html", + "distribute/users/build-buzz.html", + "distribute/users/build-community.html" ] }, "distribute/engagelanding": { @@ -284,8 +296,11 @@ var RESOURCE_COLLECTIONS = { "distribute/engage/gcm.html", "distribute/engage/easy-signin.html", "distribute/engage/deep-linking.html", - "distribute/engage/game-services.html", + "distribute/engage/ads.html", + "distribute/engage/appindexing.html", + "distribute/engage/intents.html", "distribute/engage/analytics.html", + "distribute/engage/game-services.html", "distribute/engage/app-updates.html", "distribute/engage/community.html", "distribute/engage/video.html" @@ -541,8 +556,10 @@ var RESOURCE_COLLECTIONS = { "distribute/users/promotewithads": { "title": "", "resources": [ - "http://www.google.com/ads/admob/#subid=us-en-et-dac", - "distribute/essentials/optimizing-your-app.html" + "https://support.google.com/adwords/answer/6032059", + "https://support.google.com/adwords/answer/6032073", + "https://support.google.com/adwords/answer/6167164", + "https://support.google.com/adwords/answer/6167162" ] }, "distribute/users/buildbuzz": { @@ -574,6 +591,14 @@ var RESOURCE_COLLECTIONS = { "http://www.youtube.com/yt/dev/" ] }, + "distribute/users/appindexing": { + "title": "", + "resources": [ + "https://developers.google.com/app-indexing/", + "https://developers.google.com/app-indexing/webmasters/details", + "distribute/engage/search.html" + ] + }, "distribute/toolsreference/bestpractices/apps": { "title": "", "resources": [ @@ -797,6 +822,31 @@ var RESOURCE_COLLECTIONS = { "guide/topics/appwidgets/index.html" ] }, + "distribute/engage/reengage": { + "title": "", + "resources": [ + "https://support.google.com/adwords/answer/6032073", + "distribute/engage/deep-linking.html", + "https://support.google.com/adwords/answer/6167162", + "distribute/users/promote-with-ads.html" + ] + }, + "distribute/engage/appindexing": { + "title": "", + "resources": [ + "distribute/engage/intents.html", + "distribute/engage/appindexing.html", + "distribute/users/appindexing.html" + ] + }, + "distribute/engage/intents": { + "title": "", + "resources": [ + "guide/components/intents-filters.html", + "distribute/engage/appindexing.html", + "distribute/engage/ads.html" + ] + }, "distribute/getusers/expandnewmarkets": { "title": "", "resources": [ @@ -1223,6 +1273,17 @@ var RESOURCE_COLLECTIONS = { "training/monetization/ads-and-ux.html" ] }, + "distribute/monetize/admob": { + "title": "", + "resources": [ + "https://support.google.com/admob/topic/2784623", + "https://developers.google.com/mobile-ads-sdk/download", + "http://analyticsacademy.withgoogle.com/mobile-app", + "http://support.google.com/googleplay/android-developer/topic/2985714", + "https://support.google.com/admob/answer/2753860", + "https://support.google.com/admob/" + ] + }, "distribute/monetize/paymentmethods": { "title": "", "resources": [ @@ -1233,9 +1294,12 @@ var RESOURCE_COLLECTIONS = { "preview/landing/resources": { "title": "", "resources": [ + "preview/overview.html", "preview/api-overview.html", "preview/setup-sdk.html", - "preview/samples.html" + "preview/samples.html", + "preview/reference.html", + "preview/support.html" ] }, "autolanding": { diff --git a/docs/html/jd_extras.js b/docs/html/jd_extras.js index cc11da5..150a9d4 100644 --- a/docs/html/jd_extras.js +++ b/docs/html/jd_extras.js @@ -14,6 +14,8 @@ ALL_RESOURCES_BY_URL. */ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ + /* TODO Remove standard resources from here, such as below + */ { "title":"Quizlet Developer Story", "titleFriendly":"", @@ -174,7 +176,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "title":"Introduction to Android Studio", "titleFriendly":"", "summary":"Learn why you should migrate your projects to Android Studio now and how it can help you be more productive as a developer. Rich layout editor, handy suggestions and fixes, new Android project view - these are just some of the things you can expect from the IDE, which is built on the successful IntelliJ IDEA.", - "url":"https://www.youtube.com/watch?v=K2dodTXARqc&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ&index=1", + "url":"https://www.youtube.com/watch?v=K2dodTXARqc&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ", "group":"", "keywords": ["studio", "tools"], "tags": [ @@ -186,7 +188,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "title":"Google Play Services 7.3", "titleFriendly":"", "summary":"Google Play Services 7.3 brings a ton of great new features to help you BUILD BETTER APPS! This update brings the ability to connect multiple wearables simultaneously to a single phone.", - "url":"https://www.youtube.com/watch?v=FOn64iqlphk&index=1&list=PLWz5rJ2EKKc9Qk1_iCZNbBp6adYnJf9Vf", + "url":"https://www.youtube.com/watch?v=FOn64iqlphk&list=PLWz5rJ2EKKc9Qk1_iCZNbBp6adYnJf9Vf", "group":"", "keywords": ["google play services"], "tags": [ @@ -219,10 +221,10 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "type":"video" }, { - "title":"Under the Hood of Android Auto", + "title":"Introduction to Android Auto", "titleFriendly":"", - "summary":"Your car contains some serious technology. Learn about the Android Auto architecture, which enables you to control Android apps and services running on your phone through your car. ", - "url":"https://www.youtube.com/watch?v=KNKGM4ss5Sc&index=4&list=PLWz5rJ2EKKc9BdE_PSLNIGjXXr3h_orXM", + "summary":"Android Auto brings the Android platform to the car in a way that's optimized for the driving experience. It's the same platform you already use for phones, tablets, televisions, wearables, and more. ", + "url":"https://www.youtube.com/watch?v=ctiaVxgclsg&list=PLWz5rJ2EKKc9BdE_PSLNIGjXXr3h_orXM", "group":"", "keywords": ["auto"], "tags": [ @@ -1122,7 +1124,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ ], "url": "http://www.google.com/analytics/mobile/", "timestamp": 1383243492000, - "image": "http://www.google.com//analytics/images/heros/mobile-index.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Google Mobile App Analytics", "summary": "Mobile App Analytics measures what matters most at all key stages: from first discovery and download to in-app purchases. ", "keywords": ["analytics,user behavior"], @@ -1137,9 +1139,9 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ ], "url": "https://developers.google.com/app-indexing/", "timestamp": 1383243492000, - "image": "https://developers.google.com/app-indexing/images/allthecooks_srp.png", + "image": "https://www.gstatic.com/images/icons/material/product/2x/search_64dp.png", "title": "Sign Up for App Indexing", - "summary": "Google is working with app developers and webmasters to index the content of apps and relate them to websites. When relevant, Google Search results on Android will include deep links to apps.", + "summary": "Surface your app content in Google seaerch. Deep link direct to your apps.", "keywords": [], "type": "guide", "titleFriendly": "" @@ -1169,7 +1171,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "url": "https://developers.google.com/+/mobile/android/people", "timestamp": 1383243492000, "image": "images/google/gps-googleplus.png", - "title": "Sign Up for App Indexing", + "title": "Google Sign In", "summary": "After you let users sign in with Google, you can access their age range, language, public profile information, and people that they have circled.", "keywords": ["googleplus"], "type": "guide", @@ -1448,20 +1450,6 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "lang": "en", "group": "", "tags": ["monetize", "ads"], - "url": "http://www.google.com/ads/admob/#subid=us-en-et-dac", - "timestamp": null, - "image": "distribute/images/advertising.png", - "title": "AdMob", - "summary": "Make money by connecting with over a million Google advertisers all over the world, so your revenue scales with your app.", - "keywords": ["ads"], - "type": "distribute", - "titleFriendly": "" - }, - - { - "lang": "en", - "group": "", - "tags": ["monetize", "ads"], "url": "http://www.google.com/doubleclick/publishers/small-business/index.html", "timestamp": null, "image": "http://www.google.com/doubleclick/publishers/small-business/images/define_ad.png", @@ -1478,6 +1466,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "url": "http://support.google.com/googleplay/android-developer/topic/2985714", "timestamp": null, "image": "http://storage.googleapis.com/support-kms-prod/SNP_712EA2784949DDF085C46E3BE7B1DC618A09_4389397_en_v0", + "image": "https://www.gstatic.com/images/icons/material/product/2x/play_64dp.png", "title": "Policy Center: Ads", "summary": "Introduction to ads and system interference policies in Google Play", "keywords": ["ads"], @@ -1815,7 +1804,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://developers.google.com/analytics/solutions/mobile-implementation-guide", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Mobile Analytics Implementation Guide", "summary": "Learn how you can implement additional Google Analytics features to better understand your users and their behavior.", "keywords": ["analytics", "Play", "users"], @@ -1841,7 +1830,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://analyticsacademy.withgoogle.com/course04", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Mobile App Analytics Fundamentals", "summary": "This self-paced online course on mobile app measurement shows you how Google Analytics data can help you make your app more discoverable and profitable.", "keywords": ["analytics"], @@ -1854,7 +1843,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://github.com/googleanalytics/google-analytics-plugin-for-unity", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Analytics Plugin for Unity", "summary": "If you're building games with Unity, you can now implement Analytics once and ship it on multiple platforms automatically.", "keywords": ["analytics", "unity"], @@ -1867,7 +1856,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://developers.google.com/analytics/devguides/collection/android/v4/enhanced-ecommerce", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "In-App Purchases & Ecommerce", "summary": "If your app sells virtual or real goods, ecommerce tracking can help you understand what behaviors lead to purchases.", "keywords": ["analytics, ecommerce"], @@ -1880,7 +1869,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://support.google.com/analytics/answer/1032415", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Goals", "summary": "Track important actions in your app as goals and measure performance against your objectives.", "keywords": ["analytics"], @@ -1893,7 +1882,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://support.google.com/analytics/answer/2568874?ref_topic=6012392", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Active Users", "summary": "The active user report displays your 1-day, 7-day, 14-day and 30-day trailing active users next to each other, to help you analyze performance over time.", "keywords": ["analytics"], @@ -1906,7 +1895,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://developers.google.com/analytics/devguides/collection/android/v4/events", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Events", "summary": "Events let you measure granular in-app activities and understand user journeys.", "keywords": ["analytics"], @@ -1919,7 +1908,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://developers.google.com/analytics/devguides/collection/android/v4/customdimsmets", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Custom Dimensions", "summary": "Custom dimensions enable the association of metadata with hits, users, and sessions in Google Analytics.", "keywords": ["analytics"], @@ -1932,7 +1921,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://developers.google.com/analytics/devguides/collection/android/v4/user-id", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "User ID", "summary": "The User ID feature enables Google Analytics to measure user activities that span across devices.", "keywords": ["analytics"], @@ -1945,7 +1934,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://developers.google.com/analytics/devguides/collection/android/v4/display-features", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Demographic Reporting", "summary": "By enabling display features, you can see just how different user segments engage and monetize.", "keywords": ["analytics"], @@ -1958,7 +1947,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://support.google.com/analytics/answer/3123906", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "User Segmentation", "summary": "Segments let you compare metrics for different subsets of users to identify trends and opportunities for your apps.", "keywords": ["analytics"], @@ -1971,7 +1960,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://developers.google.com/analytics/devguides/collection/android/v4/campaigns", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Campaign Tracking", "summary": "Measuring campaigns in Google Analytics enables the attribution of campaigns and traffic sources to user activity within your app.", "keywords": ["analytics"], @@ -1997,7 +1986,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://support.google.com/analytics/answer/1033961", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "AdWords Integration", "summary": "Link Analytics and AdWords to see the entire picture of customer behavior, from ad click or impression through your site to conversion. ", "keywords": ["adwords, analytics"], @@ -2010,7 +1999,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#google-play-url-builder", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Campaign URL builder for Google Play", "summary": "Easily create your URLs to track install campaigns.", "keywords": ["play, analytics"], @@ -2036,7 +2025,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://support.google.com/analytics/answer/2785577", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Behavior Flow", "summary": "The Behavior Flow report visualizes the path users traveled from one Screen or Event to the next. This report can help you discover what content keeps users engaged with your app.", "keywords": ["analytics"], @@ -2049,7 +2038,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://support.google.com/analytics/answer/1151300", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Custom Reports", "summary": "Custom Reports let you create your own reports in your Google Analytics account.", "keywords": ["analytics"], @@ -2062,7 +2051,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://support.google.com/analytics/answer/2611268", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Audience Lists & Remarketing", "summary": "Remarketing with Google Analytics lets you deliver targeted ads to users who've already been to your site or app. You can even base those ads on the behavior those users displayed during their sessions.", "keywords": ["analytics"], @@ -2075,7 +2064,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://support.google.com/admob/answer/3508177", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "AdMob Integration", "summary": "With Google Analytics in AdMob, you can view Google Analytics data for your linked apps from within your AdMob account.", "keywords": ["analytics"], @@ -2088,7 +2077,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://developers.google.com/analytics/solutions/mobile-campaign-deep-link", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Deep-Linking", "summary": "Google Analytics gives you a full view of how returning users are interacting with your app, for a holistic view beyond the install.", "keywords": ["analytics"], @@ -2101,7 +2090,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://support.google.com/admob/answer/3508177", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "AdMob Integration", "summary": "With Google Analytics in AdMob, you can view Google Analytics data for your linked apps from within your AdMob account.", "keywords": ["analytics"], @@ -2114,7 +2103,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "tags": [], "url": "https://support.google.com/analytics/answer/2568874", "timestamp": null, - "image": "distribute/images/gp-analytics-logo.jpg", + "image": "images/cards/analytics-mobile_2x.jpg", "title": "Active User Report", "summary": "Active user report displays your 1-day, 7-day, 14-day and 30-day trailing active users next to each other, to help you run benchmark analyses of their performance over time.", "keywords": ["analytics"], @@ -2251,7 +2240,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "type": "materialdesign", "titleFriendly": "" }, - { + { "lang": "en", "group": "", "tags": [ @@ -2268,6 +2257,187 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "type": "material design", "titleFriendly": "" }, + + { + "lang": "en", + "group": "", + "tags": [], + "url": "https://support.google.com/adwords/answer/6032059", + "timestamp": null, + "image": "https://www.gstatic.com/images/icons/material/product/2x/admob_64dp.png", + "title": "Setting up Mobile App Install Ads", + "summary": "With Mobile app installs campaigns on the Search and Display Networks, and TrueView for mobile app promotion on YouTube, you can create custom app install ads that run exclusively on phones and tablets.", + "keywords": ["marketing", "admob"], + "type": "distribute", + "titleFriendly": "" + }, + { + "lang": "en", + "group": "", + "tags": [], + "url": "https://support.google.com/adwords/answer/6167164", + "timestamp": null, + "image": "https://www.gstatic.com/images/icons/material/product/2x/admob_64dp.png", + "title": "Best practices for Mobile App Engagement", + "summary": "Learn how to market to your user base to drive re-engagement with your app. ", + "keywords": ["marketing", "admob"], + "type": "distribute", + "titleFriendly": "" + }, + { + "lang": "en", + "group": "", + "tags": [ + "marketing", + "engagement", + "adwords1" + ], + "url": "https://support.google.com/adwords/answer/6032073", + "timestamp": null, + "image": "https://www.gstatic.com/images/icons/material/product/2x/adwords_64dp.png", + "title": "Setting up Mobile App Engagement Ads", + "summary": "Mobile app engagement campaigns are a great choice for advertisers focused on connecting with people who already have their app.", + "keywords": [ + "marketing", + "engagement", + "adwords" + ], + "type": "distribute", + "titleFriendly": "" + }, + { + "lang": "en", + "group": "", + "tags": [ + "marketing", + "engagement" + ], + "url": "https://support.google.com/adwords/answer/6167162", + "timestamp": null, + "image": "https://www.gstatic.com/images/icons/material/product/2x/adwords_64dp.png", + "title": "Best Practices for Mobile App Installs", + "summary": "Getting your mobile app discovered can be challenging. Learn how to drive downloads of your app and grow a valuable user base.", + "keywords": ["marketing", "adwords"], + "type": "distribute", + "titleFriendly": "" + }, + + + + + + + + + { + "lang": "en", + "group": "", + "tags": [], + "url": "https://support.google.com/admob/topic/2784623", + "timestamp": null, + "image": "https://www.gstatic.com/images/icons/material/product/2x/admob_64dp.png", + "title": "Set up your AdMob account", + "summary": "Guide to setting up your account so that you get the most value.", + "keywords": ["marketing", "admob"], + "type": "distribute", + "titleFriendly": "" + }, + { + "lang": "en", + "group": "", + "tags": [], + "url": "http://analyticsacademy.withgoogle.com/mobile-app", + "timestamp": null, + "image": "https://www.gstatic.com/images/icons/material/product/2x/admob_64dp.png", + "title": "Analytics Academy for Mobile Apps", + "summary": "Learn how to use Google Analytics to make your app more discoverable and profitable.", + "keywords": ["marketing", "analytics"], + "type": "distribute", + "titleFriendly": "" + }, + { + "lang": "en", + "group": "", + "tags": [], + "url": "https://developers.google.com/mobile-ads-sdk/download", + "timestamp": null, + "image": "https://www.gstatic.com/images/icons/material/product/2x/admob_64dp.png", + "title": "Google Mobile Ads SDK", + "summary": "Use the Mobile Ads SDK to start showing AdMob ads in your apps.", + "keywords": ["marketing", "adwords"], + "type": "distribute", + "titleFriendly": "" + }, + { + "lang": "en", + "group": "", + "tags": [], + "url": "https://support.google.com/admob/", + "timestamp": null, + "image": "https://www.gstatic.com/images/icons/material/product/2x/admob_64dp.png", + "title": "AdMob Help Center", + "summary": "For setup assistance, general info, and fixes for specific problems check out the AdMob Help Center.", + "keywords": ["admob"], + "type": "distribute", + "titleFriendly": "" + }, + { + "lang": "en", + "group": "", + "tags": [], + "url": "https://support.google.com/admob/answer/2753860", + "timestamp": null, + "image": "https://www.gstatic.com/images/icons/material/product/2x/admob_64dp.png", + "title": "AdMob Policy Guidelines", + "summary": "Learn about best practices for displaying AdMob ads in your apps to maximize revenue.", + "keywords": ["admob"], + "type": "distribute", + "titleFriendly": "" + }, + { + "lang": "en", + "group": "", + "tags": ["appindexing", "search", "getusers"], + "url": "https://developers.google.com/app-indexing/", + "timestamp": 1383243492000, + "image": "https://www.gstatic.com/images/icons/material/product/2x/search_64dp.png", + "title": "Set Up App Indexing", + "summary": "Learn more about how Google Search can help users discover your app, along with other ways you can integrate with Google Search.", + "keywords": ["search"], + "type": "guide", + "titleFriendly": "" + }, + { + "lang": "en", + "group": "", + "tags": ["appindexing", "search", "getusers"], + "url": "https://developers.google.com/app-indexing/webmasters/details", + "timestamp": null, + "image": "https://www.gstatic.com/images/icons/material/product/2x/search_64dp.png", + "title": "Verify and Create Deep Links", + "summary": "Index your app today by adding deep links and verifying its official web site to ensure it starts appearing in Google Search results.", + "keywords": ["search"], + "type": "distribute", + "titleFriendly": "" + }, + { + "lang": "en", + "group": "", + "tags": [ + "appindexing", + "search", + "getusers", + ], + "url": "https://support.google.com/admob/answer/2753860", + "timestamp": null, + "image": "https://www.gstatic.com/images/icons/material/product/2x/search_64dp.png", + "title": "Drive use with Google Search", + "summary": "More about how app indexing and deep links can drive users directly to the content in your app. ", + "keywords": [], + "type": "distribute", + "titleFriendly": "" + }, + // TODO remove this? { "title":"Android Wear Materials", "titleFriendly":"", @@ -2328,12 +2498,11 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "lang":"en", "type":"video" }, - { "title":"Android Support Library", "titleFriendly":"", "summary":"These essential components help you build a great app that works on the huge variety of Android devices, faster.", - "url":"https://www.youtube.com/watch?v=3PIc-DuEU2s&index=1&list=PLWz5rJ2EKKc9e0d55YHgJFHXNZbGHEXJX", + "url":"https://www.youtube.com/watch?v=3PIc-DuEU2s&list=PLWz5rJ2EKKc9e0d55YHgJFHXNZbGHEXJX", "group":"", "keywords": ["support", "compatibility"], "tags": [], @@ -2342,13 +2511,61 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "type":"Video" }, { + "title":"Consistent Design with the AppCompat Support Library", + "titleFriendly":"", + "summary":"Getting a great looking app doesn't have to be hard: AppCompat, part of the Android Support Library, gives you a consistent design baseline that works on all Android 2.1 or higher devices.", + "url":"https://www.youtube.com/watch?v=5Be2mJzP-Uw&list=PLWz5rJ2EKKc9e0d55YHgJFHXNZbGHEXJX", + "group":"", + "keywords": ["support", "compatibility","design-code"], + "tags": [], + "image":"http://i1.ytimg.com/vi/5Be2mJzP-Uw/maxresdefault.jpg", + "lang":"en", + "type":"Video" + }, + { + "title":"Introducing Gradle", + "titleFriendly":"", + "summary":"Android Studio uses an entirely new and flexible Gradle-based build system. You will be able to create multiple build variants for a single project, manage library dependencies and always be sure that your application builds correctly across different environments.", + "url":"https://www.youtube.com/watch?v=cD7NPxuuXYY&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ", + "group":"", + "keywords": ["tools", "studio","gradle"], + "tags": [], + "image":"http://i1.ytimg.com/vi/cD7NPxuuXYY/maxresdefault.jpg", + "lang":"en", + "type":"Video" + }, + { + "title":"Android Studio Layout Editor", + "titleFriendly":"", + "summary":"Android Studio includes a rich, visual layout editor that helps developers create better user interfaces. It eliminates the need to deploy the APK on a real device with each change, making iterations faster and helping eliminate common errors earlier in the development process.", + "url":"https://www.youtube.com/watch?v=JLLnhwtDoHw&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ", + "group":"", + "keywords": ["tools", "studio","layout"], + "tags": [], + "image":"http://i1.ytimg.com/vi/JLLnhwtDoHw/maxresdefault.jpg", + "lang":"en", + "type":"Video" + }, + { + "title":"Debugging and testing in Android Studio", + "titleFriendly":"", + "summary":"Learn about new debugger features in Android Studio 1.2: value inlining, quick access to referring objects and a Java .class decompiler, just to name a few. See some new tools and views that let you monitor the CPU and memory performance of your app from within the IDE. ", + "url":"https://www.youtube.com/watch?v=2I6fuD20qlY&list=PLWz5rJ2EKKc8I9gHTMh5yKkwRRGE8BjbQ", + "group":"", + "keywords": ["tools", "studio","debugging","profiling","performance"], + "tags": [], + "image":"http://i1.ytimg.com/vi/2I6fuD20qlY/maxresdefault.jpg", + "lang":"en", + "type":"Video" + }, + { "tags": [ "android", "developerstory", "googleplay", "featured" ], - "title": "Android Developer Storys: Jelly Button Games — Growing globally through data driven development", + "title": "Android Developer Story: Jelly Button Games — Growing globally through data driven development", "type": "youtube", "url": "http://www.youtube.com/watch?v=Pd49vTkvu0U" }, diff --git a/docs/html/preview/data-binding/guide.jd b/docs/html/preview/data-binding/guide.jd new file mode 100644 index 0000000..49b690f --- /dev/null +++ b/docs/html/preview/data-binding/guide.jd @@ -0,0 +1,908 @@ +page.title=Data Binding Guide + +@jd:body +<p>Data Binding allows you write declarative layouts and minimize the glue code +that is necessary to bind your application logic and layouts.</p> + + +<h2 id=build_environment>Build Environment</h2> + + +<p><strong>Setting Up Work Environment:</strong></p> + +<p>Data Binding EAP only supports gradle.</p> + +<p>To set up your application, unzip the provided bundle to a location. It has 3 +sections</p> + +<ul> + <li> <em>maven-repo:</em> which keeps the data-binding libraries + <li> <em>samples:</em> Sample applications + <li> <em>databinding.properties:</em> Properties file that can be used to integrate with your app +</ul> + +<p>Add the following section to the project’s build.gradle file (not the module's +build.gradle) and replace <code><BUNDLE_FOLDER> </code>with the absolute path of the bundle that you’ve unzipped in the previous step.</p> + +<pre class=prettyprint> +buildscript { + <strong>def </strong>eapFolder = '<BUNDLE_FOLDER>' +<strong> def </strong>Properties props = <strong>new </strong>Properties() + props.load(<strong>new </strong>FileInputStream(<strong>"</strong>${eapFolder}<strong>/databinding.properties"</strong>)) + props.mavenRepoDir = <strong>"</strong>${eapFolder}<strong>/</strong>${props.mavenRepoName}<strong>" + </strong>ext.config = props + repositories { + jcenter() + maven { + url config.mavenRepoDir + } + } + dependencies { + classpath <strong>"com.android.tools.build:gradle:1.1.3" + </strong>classpath <strong>"com.android.databinding:dataBinder:</strong>${config.snapshotVersion}<strong>" +<em></strong> </em>} +} +allprojects { + repositories { + jcenter() + maven { + url config.mavenRepoDir + } + } +} +</pre> + +<p>Next, add the following lines to the <em>build.gradle</em> +file of each module that will use data-binding. The application module must +have this, even if only its libraries use data binding.</p> + +<pre class=prettyprint> +apply plugin: <strong>'com.android.databinding' +</strong>dependencies { + compile <strong>"com.android.databinding:library:</strong>${config.snapshotVersion}<strong>" +</strong> compile <strong>"com.android.databinding:baseLibrary:</strong>${config.snapshotVersion}<strong>" +</strong> compile <strong>"com.android.databinding:adapters:</strong>${config.snapshotVersion}<strong>" +</strong> provided <strong>"com.android.databinding:annotationprocessor:</strong>${config.snapshotVersion}<strong>" +</strong>} +</pre> + + +<h2 id="data_binding_layout_files">Data Binding Layout Files</h2> + + +<h3 id="writing_expressions">Writing your first data binding expressions:</h3> + +<p>Data-binding layout files are slightly different and start with a root tag of +<strong>layout</strong> followed by a <strong>data</strong> element and a +<strong>view</strong> root element. This view element is what your root would +be in a non-binding layout file.A sample file looks like this:</p> + +<pre class=prettyprint> +<em><?<strong></em>xml version="1.0" encoding="utf-8"<em></strong>?> +</em><<strong>layout xmlns:android="http://schemas.android.com/apk/res/android"</strong>> + <<strong>data</strong>> + <<strong>variable name="user" type="com.example.User"</strong>/> + </<strong>data</strong>> + <<strong>LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"</strong>> + <<strong>TextView android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@{user.firstName}"</strong>/> + <<strong>TextView android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@{user.lastName}"</strong>/> + </<strong>LinearLayout</strong>> +</<strong>layout</strong>> +</pre> + +<p>The user <strong>variable</strong> within <strong>data</strong> describes a property that may be used within this layout.</p> + +<pre class=prettyprint> +<<strong>variable name="user" type="com.example.User"</strong>/> +</pre> + +<p>Expressions within the layout are written in the attribute properties using the +“<code>@{}</code>” syntax. Here, the TextView’s text is set to the firstName property of user:</p> +<pre class=prettyprint> +<<strong>TextView android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@{user.firstName}"</strong>/> +</pre> + + +<h3 id="data_object">Data Object</h3> + +<p>Let’s assume for now that you have a plain-old Java object (POJO) for User:</p> +<pre class=prettyprint> +<strong>public class </strong>User { + <strong>public final </strong>String <strong>firstName</strong>; + <strong>public final </strong>String <strong>lastName</strong>; + <strong>public </strong>User(String firstName, String lastName) { + <strong>this</strong>.<strong>firstName </strong>= firstName; + <strong>this</strong>.<strong>lastName </strong>= lastName; + } +} +</pre> + +<p>This type of object has data that never changes. It is common in applications +to have data that is read once and never changes thereafter. It is also +possible to use a JavaBeans objects:</p> +<pre class=prettyprint> +<strong>public class </strong>User { + <strong>private final </strong>String <strong>firstName</strong>; + <strong>private final </strong>String <strong>lastName</strong>; + <strong>public </strong>User(String firstName, String lastName) { + <strong>this</strong>.<strong>firstName </strong>= firstName; + <strong>this</strong>.<strong>lastName </strong>= lastName; + } + <strong>public </strong>String getFirstName() { + <strong>return this</strong>.<strong>firstName</strong>; + } + <strong>public </strong>String getLastName() { + <strong>return this</strong>.<strong>lastName</strong>; + } +} +</pre> + +<p>From the perspective of data binding, these two classes are equivalent. The +expression <strong><code>@{user.lastName}</code></strong> used for the TextView’s <strong><code>android:text</code></strong> attribute will access the <strong><code>firstName</code></strong> field in the former class and the <code>getFirstName()</code> method in the latter class. +</p><h3 id=binding_data>Binding Data</h3> + +<p>By default, a Binding class will be generated based on the name of the layout +file, converting it to Pascal case and suffixing “Binding” to it. The above +layout file was <code>activity_main.xml</code> so the generate class was <code>ActivityMainBinding</code>. This class holds all the bindings from the layout properties (e.g. the <code>user</code> variable) to the layout’s Views and knows how to assign values for the binding +expressions.The easiest means for creating the bindings is to do it while inflating: +</p> + +<pre class=prettyprint> +@Override +<strong>protected void </strong>onCreate(Bundle savedInstanceState) { + <strong>super</strong>.onCreate(savedInstanceState); + ActivityMainBinding binding = DataBindingUtil.<em>setContentView</em>(<strong>this</strong>, R.layout.<em><strong>main_activity</strong></em>); + User user = <strong>new </strong>User(<strong>"Test"</strong>, <strong>"User"</strong>); + binding.setUser(user); +} +</pre> + +<p>You’re done! Run the application and you’ll see Test User in the UI.Alternatively, you can get the view via: +</p><pre class=prettyprint> +MainActivityBinding binding = MainActivityBinding.<em>inflate</em>(getLayoutInflater()); +</pre> + +<p>If you are using data binding items inside a ListView or RecyclerView adapter, +you may prefer to use: +</p><pre class=prettyprint> +ListItemBinding binding = ListItemBinding.inflate(layoutInflater, viewGroup, +false); +//or +ListItemBinding binding = DataBindingUtil.<em>inflate</em>(layoutInflater, R.layout.<em><strong>list_item</strong></em>, viewGroup, <strong>false</strong>); +</pre> + + +<h2 id=layout_details>Layout Details</h2> + + +<h3 id=imports>Imports</h3> + +<p>Zero or more <strong><code>import</code></strong> elements may be used inside the <strong><code>data</code></strong> element. These allow easy reference to classes inside your layout file, just +like in Java. +</p><pre class=prettyprint> +<<strong>data</strong>> + <<strong>import type="android.view.View"</strong>/> +</<strong>data</strong>> +</pre> + +<p>Now, View may be used within your binding expression: +</p><pre class=prettyprint> +<<strong>TextView + android:text="@{user.lastName}" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="@{user.isAdult ? View.VISIBLE : View.GONE}"</strong>/> +</pre> + +<p>When there are class name conflicts, one of the classes may be renamed to an +“alias:”</p> +<pre class=prettyprint> +<<strong>import type="android.view.View"</strong>/> +<<strong>import type="com.example.real.estate.View" + alias="Vista"</strong>/> +</pre> + +<p>Now, <strong><code>Vista</code></strong> may be used to reference the <code>com.example.real.estate.View</code> and <strong><code>View</code></strong> may be used to reference <code>android.view.View </code>within the layout file.Imported types may be used as type references in variables and expressions:</p> +<pre class=prettyprint> +<<strong>data</strong>> + <<strong>import type="com.example.User"</strong>/> + <<strong>import type="java.util.List"</strong>/> + <<strong>variable name="user" type="User"</strong>/> + <<strong>variable name="userList" type="List<User>"</strong>/> +</<strong>data</strong>> +… +<<strong>TextView + android:text="@{((User)(user.connection)).lastName}" + android:layout_width="wrap_content" + android:layout_height="wrap_content"</strong>/> +</pre> + +<p>Imported types may also be used when referencing static fields and methods in +expressions:</p> +<pre class=prettyprint> +<<strong>data</strong>> + <<strong>import type="com.example.MyStringUtils"</strong>/> + <<strong>variable name="user" type="com.example.User"</strong>/> +</<strong>data</strong>> +… +<<strong>TextView + android:text="@{MyStringUtils.capitalize(user.lastName)}" + android:layout_width="wrap_content" + android:layout_height="wrap_content"</strong>/> +</pre> + +<p>Just as in Java, <code>java.lang.*</code> is imported automatically.</p> +<h3 id=variables>Variables</h3> + +<p>Any number of <strong><code>variable</code></strong> elements may be used inside the <strong><code>data</code></strong> element. Each <strong><code>variable</code></strong> element describes a property that may be set on the layout to be used in +binding expressions within the layout file.</p> +<pre class=prettyprint> +<<strong>data</strong>> + <<strong>import type="android.graphics.drawable.Drawable"</strong>/> + <<strong>variable name="user" type="com.example.User"</strong>/> + <<strong>variable name="image" type="Drawable"</strong>/> + <<strong>variable name="note" type="String"</strong>/> +</<strong>data</strong>> +</pre> + +<p>The variable types are inspected at compile time, so if a variable implements <a href="#observable_objects">Observable</a>, <a href="#observable_collections">observable collection</a>, that should be reflected in the type. If the variable is a base class or + interface that does not implement the Observable* interface, the variables will <strong>not be</strong> observed!</p> + +<p>When there are different layout files for various configurations (e.g. +landscape or portrait), the variables will be combined. There must not be +conflicting variable definitions between these layout files.</p> + +<p>The generated binding class will have a setter and getter for each of the +described variables. The variables will take the default Java values until the +setter is called — <code>null</code> for reference types, <code>0</code> for <code>int</code>, <code>false</code> for <code>boolean</code>, etc.</p> + +<h3 id=custom_binding_class_names>Custom Binding Class Names</h3> + +<p>By default, a Binding class is generated based on the name of the layout file, +starting it with upper-case, removing underscores ( _ ) and capitalizing the +following letter and then suffixing “Binding”. This class will be placed in a +databinding package under the module package. For example, the layout file <code>contact_item.xml</code> will generate <code>ContactItemBinding</code>. If the module package is <code>com.example.my.app</code>, then it will be placed in <code>com.example.my.app.databinding</code>.</p> + +<p>Binding classes may be renamed or placed in different packages by adjusting the <strong><code>class</code></strong> attribute of the <strong><code>data</code></strong> element. For example:</p> +<pre class=prettyprint> +<<strong>data class="ContactItem"</strong>> + ... +</<strong>data</strong>> +</pre> + +<p>This generates the binding class as <code>ContactItem</code> in the databinding package in the module package. If the class should be +generated in a different package within the module package, it may be prefixed +with “.”:</p> +<pre class=prettyprint> +<<strong>data class=".ContactItem"</strong>> + ... +</<strong>data</strong>> +</pre> + +In this case, <code>ContactItem</code> is generated in the module package directly.Any package may be used if the full package is provided: +<pre class=prettyprint> +<<strong>data class="com.example.ContactItem"</strong>> + ... +</<strong>data</strong>> +</pre> + + +<h3 id=includes>Includes</h3> + +<p>Variables may be passed into an included layout's binding from the containing +layout by using the application namespace and the variable name in an +attribute:</p> +<pre class=prettyprint> +<em><?<strong></em>xml version="1.0" encoding="utf-8"<em></strong>?> +</em><<strong>layout xmlns:android="http://schemas.android.com/apk/res/android" +</strong> <strong> xmlns:bind="http://schemas.android.com/apk/res-auto"</strong>> + <<strong>data</strong>> + <<strong>variable name="user" type="com.example.User"</strong>/> + </<strong>data</strong>> + <<strong>LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"</strong>> + <<strong>include layout="@layout/name" + bind:user="@{user}"</strong>/> + <<strong>include layout="@layout/contact" + bind:user="@{user}"</strong>/> + </<strong>LinearLayout</strong>> +</<strong>layout</strong>> +</pre> + +<p>Here, there must be a <code>user</code> variable in both the <code>name.xml </code>and <code>contact.xml </code>layout files.</p> +<h3 id=expression_language>Expression Language</h3> + + +<h4 id=common_features>Common Features</h4> + +<p>The expression language looks a lot like a Java expression. These are the same:</p> +<ul> + <li> Mathematical <strong><code>+ - / * %</code></strong> + <li> String concatenation <strong><code>+</code></strong> + <li> <code>L</code>ogical <strong><code>&& ||</code></strong> + <li> Binary <strong><code>&</code> <code>|</code> <code>^</code></strong> + <li> Unary <strong><code>+ - ! ~</code></strong> + <li> Shift <strong><code>>> >>> <<</code></strong> + <li> Comparison <strong><code>== > < >= <=</code></strong> + <li> <strong><code>instanceof</code></strong> + <li> Grouping <strong><code>()</code></strong> + <li> Literals - character, String, numeric, <strong><code>null</code></strong> + <li> Cast + <li> Method calls + <li> Field access + <li> Array access <strong><code>[]</code></strong> + <li> Ternary operator <strong><code>?:</code></strong> +</ul> +<p>Examples:</p> +<pre class=prettyprint> +<strong>android:text="@{String.valueOf(index + 1)}" +android:visibility="@{age < 13 ? View.GONE : View.VISIBLE}" +android:transitionName='@{"image_" + id}'</strong> +</pre> + + +<h4 id=missing_operations>Missing Operations</h4> + +<p>A few operations are missing from the expression syntax that you can use in +Java.</p> +<ul> + <li> <strong><code>this</code></strong> + <li> <strong><code>super</code></strong> + <li> <strong><code>new</code></strong> + <li> Explicit generic invocation +</ul> + +<h4 id=null_coalescing_operator>Null Coalescing Operator</h4> + +<p>The null coalescing operator (<strong><code>??</code></strong>) chooses the left operand if it is not null or the right if it is null.</p> +<pre class=prettyprint> +<strong>android:text="@{user.displayName ?? user.lastName}"</strong> +</pre> + +<p>This is functionally equivalent to:</p> +<pre class=prettyprint> +<strong>android:text="@{user.displayName != null ? user.displayName : user.lastName}"</strong> +</pre> + + +<h4 id=property_reference>Property Reference</h4> + +<p>The first was already discussed in the <a href="#writing_your_first_data_binding_expressions">Writing your first data binding expressions</a> above: short form JavaBean references. When an expression references a +property on a class, it uses the same format for fields, getters, and +ObservableFields.</p> +<pre class=prettyprint> +<strong>android:text="@{user.lastName}"</strong> +</pre> + + +<h4 id=collections>Collections</h4> + +<p>Common collections: arrays, lists, sparse lists, and maps, may be accessed +using the <code>[]</code> operator for convenience.</p> +<pre class=prettyprint> +<<strong>data</strong>> + <<strong>import type="android.util.SparseArray"</strong>/> + <<strong>import type="java.util.Map"</strong>/> + <<strong>import type="java.util.List"</strong>/> + <<strong>variable name="list" type="List<String>"</strong>/> + <<strong>variable name="sparse" type="SparseArray<String>"</strong>/> + <<strong>variable name="map" type="Map<String, String>"</strong>/> + <<strong>variable name="index" type="int"</strong>/> + <<strong>variable name="key" type="String"</strong>/> +</<strong>data</strong>> +… +<strong>android:text="@{list[index]}" +</strong>… +<strong>android:text="@{sparse[index]}" +</strong>… +<strong>android:text="@{map[key]}" +</strong> +</pre> + + +<h4 id=string_literals>String Literals</h4> + +<p>When using single quotes around the attribute value, it is easy to use double +quotes in the expression:</p> +<pre class=prettyprint> +<strong>android:text='@{map["firstName"]}'</strong> +</pre> + +<p>It is also possible to use double quotes to surround the attribute value. When +doing so, String literals should either use the " or back quote (`).</p> +<pre class=prettyprint> +<strong>android:text="@{map[`firstName`}" +android:text="@{map["firstName"]}"</strong> +</pre> + + +<h4 id=resources>Resources</h4> + +<p>It is possible to access resources as part of expressions using the normal +syntax:</p> +<pre class=prettyprint> +<strong>android:padding="@{large? @dimen/largePadding : @dimen/smallPadding}"</strong> +</pre> + +<p>Format strings and plurals may be evaluated by providing parameters:</p> +<pre class=prettyprint> +<strong>android:text="@{@string/nameFormat(firstName, lastName)}" +android:text="@{@plurals/banana(bananaCount)}"</strong> +</pre> + +<p>Some resources require explicit type evaluation.</p> + +<table> + <tr> + <th>Type</th> + <th>Normal Reference</th> + <th>Expression Reference</th> + </tr> + <tr> + <td> +<pre class=prettyprint> +String[]</td> + <td> +@array</td> + <td> +@stringArray</td> + </tr> + <tr> + <td> +int[]</td> + <td> +@array</td> + <td> +@intArray</td> + </tr> + <tr> + <td> +TypedArray</td> + <td> +@array</td> + <td> +@typedArray</td> + </tr> + <tr> + <td> +Animator</td> + <td> +@animator</td> + <td> +@animator</td> + </tr> + <tr> + <td> +StateListAnimator</td> + <td> +@animator</td> + <td> +@stateListAnimator</td> + </tr> + <tr> + <td> +</pre> + +color <code>int</code></td> + <td> +<pre class=prettyprint> +@color</td> + <td> +@color</td> + </tr> + <tr> + <td> +ColorStateList</td> + <td> +@color</td> + <td> +@colorStateList</td> + </tr> +</table> + +</pre> + + +<h2 id="data_objects">Data Objects</h2> + + +<p>Any plain old Java object (POJO) may be used for data binding, but modifying a +POJO will not cause the UI to update. The real power of data binding can be +used by giving your data objects the ability to notify when data changes. There +are three different data change notification mechanisms, <code>Observable </code>objects, <code>ObservableField</code>s, and <code>observable collections</code>.</p> + +<p>When one of these observable data object is bound to the UI and a property of +the data object changes, the UI will be updated automatically.</p> + +<h3 id=observable_objects>Observable Objects</h3> + + +<p>A class implementing <code>android.databinding.Observable</code> interface will allow the binding to attach a single listener to a bound object +to listen for changes of all properties on that object.</p> + +<p>The <code>Observable</code> interface has a mechanism to add and remove listeners, but notifying is up to +the developer. To make development easier, a base class, <code>BaseObservable,</code> was created to implement the listener registration mechanism. The data class +implementer is still responsible for notifying when the properties change. This +is done by assigning an <code>Bindable </code>annotation to the getter and notifying in the setter.</p> + +<pre class=prettyprint> +<strong>private static class </strong>User <strong>extends </strong>BaseObservable { + <strong>private </strong>String <strong>firstName</strong>; + <strong>private </strong>String <strong>lastName</strong>; + @Bindable + <strong>public </strong>String getFirstName() { + <strong>return this</strong>.<strong>firstName</strong>; + } + @Bindable + <strong>public </strong>String getFirstName() { + <strong>return this</strong>.<strong>lastName</strong>; + } + <strong>public void </strong>setFirstName(String firstName) { + <strong>this</strong>.<strong>firstName </strong>= firstName; + notifyPropertyChanged(BR.firstName); + } + <strong>public void </strong>setLastName(String lastName) { + <strong>this</strong>.<strong>lastName </strong>= lastName; + notifyPropertyChanged(BR.lastName); + } +} +</pre> + +<p>The <code>Bindable </code>annotation generates an entry in the BR class file during compilation. The BR +class file will be generated in the module package.If the base class for data classes cannot be changed, the <code>Observable</code> interface may be implemented using the convenient <code>PropertyChangeRegistry</code> to store and notify listeners efficiently.</p> + +<h3 id=observablefields>ObservableFields</h3> + +<p>A little work is involved in creating Observable classes, so developers who +want to save time or have few properties may use ObservableFields. +ObservableFields are self-contained observable objects that have a single +field. There are versions for all primitive types and one for reference types. +To use, create a public final field in the data class:</p> +<pre class=prettyprint> +<strong>private static class </strong>User <strong>extends </strong>BaseObservable { + <strong>public final </strong>ObservableField<String> <strong>firstName </strong>= + <strong>new </strong>ObservableField<>(); + <strong>public final </strong>ObservableField<String> <strong>lastName </strong>= + <strong>new </strong>ObservableField<>(); + <strong>public final </strong>ObservableInt <strong>age </strong>= <strong>new </strong>ObservableInt(); +} +</pre> + +<p>That's it! To access the value, use the set and get accessor methods:</p> +<pre class=prettyprint> +user.<strong>firstName</strong>.set(<strong>"Google"</strong>); +<strong>int </strong>age = user.<strong>age</strong>.get(); +</pre> + + +<h3 id=observable_collections>Observable Collections</h3> + +<p>Some applications use more dynamic structures to hold data. Observable + collections allow keyed access to these data objects.ObservableArrayMap is useful when the key is a reference type, such as String.</p> + +<pre class=prettyprint> +ObservableArrayMap<String, Object> user = <strong>new </strong>ObservableArrayMap<>(); +user.put(<strong>"firstName"</strong>, <strong>"Google"</strong>); +user.put(<strong>"lastName"</strong>, <strong>"Inc."</strong>); +user.put(<strong>"age"</strong>, 17); +</pre> + +In the layout, the map may be accessed through the String keys: +<pre class=prettyprint> +<<strong>data</strong>> + <<strong>import type="android.databinding.ObservableMap"</strong>/> + <<strong>variable name="user" type="ObservableMap<String, Object>"</strong>/> +</<strong>data</strong>> +… +<<strong>TextView + android:text='@{user["lastName"]}' + android:layout_width="wrap_content" + android:layout_height="wrap_content"</strong>/> +<<strong>TextView + android:text='@{String.valueOf(1 + (Integer)user["age"])}' + android:layout_width="wrap_content" + android:layout_height="wrap_content"</strong>/> +</pre> + +<p>ObservableArrayList is useful when the key is an integer:</p> +<pre class=prettyprint> +ObservableArrayList<Object> user = <strong>new </strong>ObservableArrayList<>(); +user.add(<strong>"Google"</strong>); +user.add(<strong>"Inc."</strong>); +user.add(17); +</pre> + +<p>In the layout, the list may be accessed through the indices:</p> +<pre class=prettyprint> +<<strong>data</strong>> + <<strong>import type="android.databinding.ObservableList"</strong>/> + <<strong>import type="com.example.my.app.Fields"</strong>/> + <<strong>variable name="user" type="ObservableList<Object>"</strong>/> +</<strong>data</strong>> +… +<<strong>TextView + android:text='@{user[Fields.LAST_NAME]}' + android:layout_width="wrap_content" + android:layout_height="wrap_content"</strong>/> +<<strong>TextView + android:text='@{String.valueOf(1 + (Integer)user[Fields.AGE])}' + android:layout_width="wrap_content" + android:layout_height="wrap_content"</strong>/> +</pre> + + +<h2 id=generated_binding>Generated Binding</h2> + +<p>The generated binding class links the layout variables with the Views within +the layout. As discussed earlier, the name and package of the Binding may be <a href="#custom_binding_class_names">customized</a>. The Generated binding classes all extend <code>android.databinding.ViewDataBinding</code>.</p> +<h3 id=creating>Creating</h3> + +<p>The binding should be created soon after inflation to ensure that the View +hierarchy is not disturbed prior to binding to the Views with expressions +within the layout. There are a few ways to bind to a layout. The most common is +to use the static methods on the Binding class.The inflate method inflates the View hierarchy and binds to it all it one step. +There are versions that attach the View to its parent and that inflate without +attaching.</p> +<pre class=prettyprint> +MyLayoutBinding binding = MyLayoutBinding.<em>inflate</em>(<strong>this</strong>); +MyLayoutBinding binding = MyLayoutBinding.<em>inflate</em>(viewGroup); +</pre> + +<p>If the layout was inflated using a different mechanism, it may be bound +separately:</p> +<pre class=prettyprint> +MyLayoutBinding binding = MyLayoutBinding.<em>bind</em>(viewRoot); +</pre> + +<p>Sometimes the binding cannot be known in advance. In such cases, the binding +can be created using the DataBindingUtil class:</p> +<pre class=prettyprint> +ViewDataBinding binding = DataBindingUtil.<em>inflate</em>(context, layoutId, + parent, attachToParent); +ViewDataBinding binding = DataBindingUtil.<em>bindTo</em>(viewRoot, layoutId); +</pre> + + +<h3 id=views_with_ids>Views With IDs</h3> + +<p>A public final field will be generated for each View with an ID in the layout. +The binding does a single pass on the View hierarchy, extracting the Views with +IDs. This mechanism can be faster than calling findViewById for several Views. For example:</p> +<pre class=prettyprint> +<<strong>layout xmlns:android="http://schemas.android.com/apk/res/android"</strong>> + <<strong>data</strong>> + <<strong>variable name="user" type="com.example.User"</strong>/> + </<strong>data</strong>> + <<strong>LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"</strong>> + <<strong>TextView android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@{user.firstName}" +</strong> <strong>android:id="@+id/firstName"</strong>/> + <<strong>TextView android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@{user.lastName}"</strong> <strong>android:id="@+id/lastName"</strong>/> + </<strong>LinearLayout</strong>> +</<strong>layout</strong>> +</pre> + +Will generate a binding class with: +<pre class=prettyprint> +<strong>public final </strong>TextView <strong>firstName</strong>; +<strong>public final </strong>TextView <strong>lastName</strong>; +</pre> + +<p>IDs are not nearly as necessary as without data binding, but there are still +some instances where access to Views are still necessary from code.</p> +<h3 id=variables>Variables</h3> + +<p>Each variable will be given a accessor methods.</p> +<pre class=prettyprint> +<<strong>data</strong>> + <<strong>import type="android.graphics.drawable.Drawable"</strong>/> + <<strong>variable name="user" type="com.example.User"</strong>/> + <<strong>variable name="image" type="Drawable"</strong>/> + <<strong>variable name="note" type="String"</strong>/> +</<strong>data</strong>> +</pre> + +<p>will generate setters and getters in the binding:</p> +<pre class=prettyprint> +<strong>public abstract </strong>com.example.User getUser(); +<strong>public abstract void </strong>setUser(com.example.User user); +<strong>public abstract </strong>Drawable getImage(); +<strong>public abstract void </strong>setImage(Drawable image); +<strong>public abstract </strong>String getNote(); +<strong>public abstract void </strong>setNote(String note); +</pre> + + +<h3 id=viewstubs>ViewStubs</h3> + +<p>ViewStubs are a little different from normal Views. They start off invisible +and when they either are made visible or are explicitly told to inflate, they +replace themselves in the layout by inflating another layout.</p> + +<p>Because the ViewStub essentially disappears from the View hierarchy, the View +in the binding object must also disappear to allow collection. Because the +Views are final, a ViewStubProxy object takes the place of the ViewStub, giving +the developer access to the ViewStub when it exists and also access to the +inflated View hierarchy when the ViewStub has been inflated.</p> + +<p>When inflating another layout, a binding must be established for the new +layout. Therefore, the ViewStubProxy must listen to the ViewStub's +OnInflateListener and establish the binding at that time. Since only one can +exist, the ViewStubProxy allows the developer to set an OnInflateListener on it +that it will call after establishing the binding.</p> + +<h3 id=advanced_binding>Advanced Binding</h3> + + +<h4 id=dynamic_variables>Dynamic Variables</h4> + +<p>At times, the specific binding class won't be known. For example, a +RecyclerView Adapter operating against arbitrary layouts won't know the +specific binding class. It still must assign the binding value during the +onBindViewHolder.</p> + +<p>In this example, all layouts that the RecyclerView binds to have an "item" +variable. The BindingHolder has a getBinding method returning the <code>ViewDataBinding</code> base.</p> +<pre class=prettyprint> +<strong>public void </strong>onBindViewHolder(BindingHolder holder, <strong>int </strong>position) { + <strong>final </strong>T item = <strong>mItems</strong>.get(position); + holder.getBinding().setVariable(BR.item, item); + holder.getBinding().executePendingBindings(); +} +</pre> + + +<h4 id=immediate_binding>Immediate Binding</h4> + +<p>When a variable or observable changes, the binding will be scheduled to change +before the next frame. There are times, however, when binding must be executed +immediately. To force execution, use the executePendingBindings() method.</p> +<h2 id=attribute_setters>Attribute Setters</h2> + +<p>Whenever a bound value changes, the generated binding class must call a setter +method on the View with the binding expression. The data binding framework has +ways to customize which method to call to set the value.</p> +<h3 id=automatic_setters>Automatic Setters</h3> + +For an attribute, data binding tries to find the method setAttribute. The +namespace for the attribute does not matter, only the attribute name itself. + +<p>For example, an expression associated with TextView's attribute <strong><code>android:text</code></strong> will look for a setText(String). If the expression returns an int, data +binding will search for a setText(int) method. Be careful to have the +expression return the correct type, casting if necessary.Note that data binding will work even if no attribute exists with the given +name. You can then easily "create" attributes for any setter by using data +binding. For example, support DrawerLayout doesn't have any attributes, but +plenty of setters. You can use the automatic setters to use one of these.</p> +<pre class=prettyprint> +<android.support.v4.widget.<strong>DrawerLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:scrimColor="@{@color/scrim}" + app:drawerListener="@{fragment.drawerListener}"/></strong> +</pre> + + +<h3 id=renamed_setters>Renamed Setters</h3> + +<p>Some attributes have setters that don't match by name. For these methods, an +attribute may be associated with the setter through BindingMethods annotation. +This must be associated with a class and contains BindingMethod annotations, +one for each renamed method. For example, the <strong><code>android:tint</code></strong> attribute is really associated with setImageTintList, not setTint.</p> +<pre class=prettyprint> +@BindingMethods({ + @BindingMethod(type = <strong>"android.widget.ImageView"</strong>, + attribute = <strong>"android:tint"</strong>, + method = <strong>"setImageTintList"</strong>), +}) +</pre> + +<p>It is unlikely that developers will need to rename setters; the android +framework attributes have already been implemented.</p> +<h3 id=custom_setters>Custom Setters</h3> + +<p>Some attributes need custom binding logic. For example, there is no associated +setter for the <strong><code>android:paddingLeft</code></strong> attribute. Instead, setPadding(left, top, right, bottom) exists. A static +binding adapter method with the BindingAdapter annotation allows the developer +to customize how a setter for an attribute is called.</p> + +<p>The android attributes have already had BindingAdapters created. For example, +here is the one for paddingLeft:</p> +<pre class=prettyprint></p> +@BindingAdapter(<strong>"android:paddingLeft"</strong>) +<strong>public static void </strong>setPaddingLeft(View view, <strong>int </strong>padding) { + view.setPadding(padding, + view.getPaddingTop(), + view.getPaddingRight(), + view.getPaddingBottom()); +} +</pre> + +<p>Binding adapters are useful for other types of customization. For example, a + custom loader can be called off-thread to load an image.</p> + +<p>Developer-created binding adapters will override the data binding default +adapters when there is a conflict.</p> + +<p>You can also have adapters that receive multiple parameters. </p> +<pre class=prettyprint> +@BindingAdapter(attributes = {<strong>"bind:imageUrl"</strong>, <strong>"bind:error"</strong>}) +<strong>public static void </strong>loadImage(ImageView view, String url, Drawable error) { + Picasso.<em>with</em>(view.getContext()).load(url).error(error).into(view); +} +</pre> + +<p>This adapter will be called if both <strong>imageUrl </strong>and <strong>error </strong>are used for an ImageView and <em>imageUrl </em>is a string and <em>error</em> is a drawable.</p> +<ul> + <li> Custom namespaces are ignore during matching. + <li> You can also write adapters for android namespace. +</ul> + +<pre class=prettyprint> +<ImageView app:imageUrl=“@{venue.imageUrl}” +app:error=“@{@drawable/venueError}”/> +</pre> + + +<h2 id=converters>Converters</h2> + + +<h3 id=object_conversions>Object Conversions</h3> + +<p>When an Object is returned from a binding expression, a setter will be chosen +from the automatic, renamed, and custom setters. The Object will be cast to a +parameter type of the chosen setter.</p><p>This is a convenience for those using ObservableMaps to hold data. for example:</p> +<pre class=prettyprint> +<<strong>TextView + android:text='@{userMap["lastName"]}' + android:layout_width="wrap_content" + android:layout_height="wrap_content"</strong>/> +</pre> + +<p>The userMap returns an Object and that Object will be automatically cast to +parameter type found in the setter <code>setText(CharSequence)</code>. When there may be confusion about the parameter type, the developer will need +to cast in the expression.</p> +<h3 id=custom_conversions>Custom Conversions</h3> + +<p>Sometimes conversions should be automatic between specific types. For example, +when setting the background:</p> +<pre class=prettyprint> +<<strong>View + android:background="@{isError ? @color/red : @color/white}" + android:layout_width="wrap_content" + android:layout_height="wrap_content"</strong>/> +</pre> + +<p>Here, the background takes a <code>Drawable</code>, but the color is an integer. Whenever a <code>Drawable</code> is expected and an integer is returned, the <code>int</code> should be converted to a <code>ColorDrawable</code>. This conversion is done using a static method with a BindingConversion +annotation:</p> +<pre class=prettyprint> +@BindingConversion +<strong>public static </strong>ColorDrawable convertColorToDrawable(<strong>int </strong>color) { + <strong>return new </strong>ColorDrawable(color); +} +</pre> + +<p>Note that conversions only happen at the setter level, so it is <strong>not allowed </strong>to mix types like this:</p> +<pre class=prettyprint> +<<strong>View + android:background="@{isError ? @drawable/error : @color/white}" + android:layout_width="wrap_content" + android:layout_height="wrap_content"</strong>/> +</pre> + diff --git a/docs/html/preview/index.html b/docs/html/preview/index.html deleted file mode 100644 index af99e2d..0000000 --- a/docs/html/preview/index.html +++ /dev/null @@ -1,372 +0,0 @@ -<!DOCTYPE html> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<html> -<head> - - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<meta name="viewport" content="width=970" /> - -<meta name="Description" content="Test and build your apps against the next version of Android to ensure they're ready when the platform officially launches."> -<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> -<title>Android M Developer Preview | Android Developers</title> - -<!-- STYLESHEETS --> -<link rel="stylesheet" -href="//fonts.googleapis.com/css?family=Roboto+Condensed"> -<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" - title="roboto"> -<link href="/assets/css/default.css" rel="stylesheet" type="text/css"> - - - -<!-- JAVASCRIPT --> -<script src="//www.google.com/jsapi" type="text/javascript"></script> -<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script> -<script type="text/javascript"> - var toRoot = "/"; - var metaTags = []; - var devsite = false; -</script> -<script src="/assets/js/docs.js" type="text/javascript"></script> - -<script> - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - - ga('create', 'UA-5831155-1', 'android.com'); - ga('create', 'UA-49880327-2', 'android.com', {'name': 'universal'}); // New tracker); - ga('send', 'pageview'); - ga('universal.send', 'pageview'); // Send page view for new tracker. -</script> - -</head> - -<body class="gc-documentation - -" itemscope itemtype="http://schema.org/Article"> - - -<a name="top"></a> -<div id="body-content"> -<div class="fullpage" > -<div id="jd-content"> - <div class="jd-descr" itemprop="articleBody"> - <style> -.fullpage>#footer, -#jd-content>.content-footer.wrap { - display:none; -} -</style> - -<style> -#footer { - display: none; -} -.content-footer { - display: none; -} -</style> - -<!-- -<div style="height:20px"></div> -<div id="butterbar-wrapper"> - <div id="butterbar"> - <a href="#" id="butterbar-message"> - butterbar message - </a> - </div> -</div> ---> - - <div class="landing-rest-of-page"> - <div class="landing-section" style="padding-top:60px"> - <div class="wrap"> - <div class="landing-section-header"> - <div class="landing-h1">Android M Developer Preview</div> - <div class="landing-subhead"> - Get an early look at the next release and prepare your apps for the - official platform launch. - </div> - - <img src="/preview/images/dev-prev.png" style=" margin:0px 0 0 40px" width="860px"/> - <div class="col-6" style="margin-left:660px; margin-top:-105px"> - <a href="/preview/setup-sdk.html" class="landing-button landing-primary" - style="position:absolute;z-index:100;float:right;margin-top: 0px;"> - Get Started</a> - </div> - </div> - </div> <!-- end .wrap --> - </div> <!-- end .landing-section --> - - - - <div class="landing-section landing-gray-background" - style="margin-top:-105px; padding-bottom:20px"> - <div class="wrap"> - <div class="cols"> - <div class="landing-body" style="margin-top:-80px" > - - <div class="landing-breakout cols"> - <div class="col-4"> - <p>This Feature</p> - <p class="landing-small"> - Kevin ham hock pig cupim brisket picanha, doner pork tri-tip frankfurter - leberkas turkey. - </p> - <p class="landing-small"> - <a href="/preview/api-overview.html">Learn about this feature</a> - </p> - </div> - <div class="col-4"> - <p>That Feature</p> - <p class="landing-small"> - Bacon ipsum dolor amet meatball tongue pork loin fatback, andouille shoulder - chicken picanha pig landjaeger kielbasa shankle pastrami flank meatloaf. - </p> - <p class="landing-small"> - <a href="/preview/api-overview.html">Learn about that feature</a> - </p> - </div> - <div class="col-4"> - <p style="width:230px">Another Feature</p> - <p class="landing-small"> - Landjaeger tri-tip tenderloin pork loin jowl, meatloaf t-bone kielbasa sausage - swine spare ribs drumstick corned beef ham. - </p> - <p class="landing-small"> - <a href="/preview/api-overview.html">Learn about notifications</a> - </p> - </div> - <div class="col-4"> - <p>Moar Features</p> - <p class="landing-small"> - <b>Feature Name</b> is our effort to meatloaf boudin meatball sausage strip - steak hamburger, chuck ham pork chop. - </p> - <p class="landing-small"> - <a href="/preview/api-overview.html">Learn about moar feature</a> - </p> - </div> - </div> - <p style="margin-left:20px">See the <a href="/preview/api-overview.html">API - overview</a> for more information on the rest of the new and updated features.</p> - </div> - </div></div></div> - <div class="landing-section"> - <div class="wrap"> - <div class="cols"> - <div class="landing-body"> - <div class="col-3-wide"> - <a target="_blank" href="https://code.google.com/p/android-developer-preview/"> - <img class="landing-social-image" src="/preview/images/bugs.png" alt=""> - </a> - <div class="landing-social-copy"> - <p>Issue Tracker</p> - <p class="landing-small"> - Let us know when you encounter problems, so we can fix them and make - the platform better for you and your users. - </p><p class="landing-small"> - <a href="https://code.google.com/p/android-developer-preview/"> - Report Issues</a> - </p> - <p></p> - </div> - </div> - <div class="col-3-wide"> - <a target="_blank" href="http://g.co/androidldevpreview"> - <img class="landing-social-image" src="//www.google.com/images/icons/product/gplus-128.png" alt=""> - </a> - <div class="landing-social-copy"> - <p>Google+ </p> - <p class="landing-small"> - Join the community of Android developers testing out the M Developer Preview and - share your thoughts and experiences. - </p><p class="landing-small"> - <a href="http://g.co/androidldevpreview"> - Discuss on Google+</a> - </p> - </div> - </div> - <div class="col-3-wide"> - <a target="_blank" href="/preview/support.html"> - <img class="landing-social-image" src="/preview/images/updates.png" alt=""> - </a> - <div class="landing-social-copy"> - <p>Support and Updates</p> - <p class="landing-small"> - Updates to the preview are delivered - in the Android SDK Manager. Check back periodically - for news about the changes. - </p> - <p class="landing-small"> - <a href="/preview/support.html">Get Support</a> - </p> - </div> - </div> - </div> - </div> - </div> - </div> - - <div class="content-footer wrap" itemscope="" itemtype="http://schema.org/SiteNavigationElement"> - <div class="layout-content-col col-16" style="padding-top:4px"> - <style>#___plusone_0 {float:right !important;}</style> - <div class="g-plusone" data-size="medium"></div> - </div> - </div> - <div id="footer" class="wrap" style="width:940px;position:relative;top:-35px;z-index:-1"> - <div id="copyright"> - Except as noted, this content is - licensed under <a href="http://creativecommons.org/licenses/by/2.5/"> - Creative Commons Attribution 2.5</a>. For details and - restrictions, see the <a href="/license.html">Content - License</a>. - </div> - </div> - </div> <!-- end landing-body-content --> - - <script> - $("a.landing-down-arrow").on("click", function(e) { - $("body").animate({ - scrollTop: $(".preview-hero").height() + 76 - }, 1000, "easeOutQuint"); - e.preventDefault(); - }); - </script> - </div> - - <div class="content-footer wrap" - itemscope itemtype="http://schema.org/SiteNavigationElement"> - - <div class="paging-links layout-content-col col-10"> - - </div> - <div class="layout-content-col plus-container col-2" > - <style>#___plusone_0 {float:right !important;}</style> - <div class="g-plusone" data-size="medium"></div> - - </div> - - </div> - - - - - </div> <!-- end jd-content --> - -<div id="footer" class="wrap" style="width:940px"> - - - <div id="copyright"> - - Except as noted, this content is - licensed under <a href="http://creativecommons.org/licenses/by/2.5/"> - Creative Commons Attribution 2.5</a>. For details and - restrictions, see the <a href="/license.html">Content - License</a>. - </div> - - -</div> <!-- end footer --> -</div><!-- end doc-content --> - -</div> <!-- end body-content --> - - - - - - <script src="https://developer.android.com/ytblogger_lists_unified.js" type="text/javascript"></script> - <script src="/jd_lists_unified.js" type="text/javascript"></script> - <script src="/jd_extras.js" type="text/javascript"></script> - <script src="/jd_collections.js" type="text/javascript"></script> - <script src="/jd_tag_helpers.js" type="text/javascript"></script> - -</body> -</html> diff --git a/docs/html/preview/index.jd b/docs/html/preview/index.jd index a2d0b18..c6c2068 100644 --- a/docs/html/preview/index.jd +++ b/docs/html/preview/index.jd @@ -17,44 +17,36 @@ footer.hide=1 <div class="col-1of2 col-pull-1of2"> <h1 class="dac-hero-title">M Developer Preview</h1> <p class="dac-hero-description"> - Get ready for the next official release of the platform. Test your apps - and give us feedback! + Get ready for the next official release of the platform. The preview program gives + you an advance look at new APIs, features, and behaviors coming to Android. + Test your apps and give us feedback! </p> - <a class="dac-hero-cta" href="{@docRoot}preview/setup-sdk.html"> + + <a class="dac-hero-cta" href="{@docRoot}preview/overview.html"> <span class="dac-sprite dac-auto-chevron"></span> - Set up the Preview SDK + Preview Program Overview </a><br> <a class="dac-hero-cta" href="{@docRoot}preview/api-overview.html"> <span class="dac-sprite dac-auto-chevron"></span> Review the API changes </a><br> + <a class="dac-hero-cta" href="{@docRoot}preview/setup-sdk.html"> + <span class="dac-sprite dac-auto-chevron"></span> + Set up the Preview SDK + </a><br> <a class="dac-hero-cta" href="https://code.google.com/p/android-developer-preview/"> <span class="dac-sprite dac-auto-chevron"></span> Report issues </a><br> + </div> </div> - </div> -</section> - -<section class="dac-section dac-gray dac-small dac-invert"><div class="wrap"> - <h2 class="norule">Latest</h2> - <div class="resource-widget resource-flow-layout col-16" - data-query="collection:develop/landing/latest" - data-cardSizes="6x6" - data-maxResults="3"></div> -</div></section> - -<section class="dac-section"><div class="wrap"> - <h1 class="dac-section-title">Resources</h1> - <div class="dac-section-subtitle"> - Check out these resources to help you get started with the M Developer Preview. + <div class="dac-section dac-small"> + <div class="resource-widget resource-flow-layout col-16" + data-query="collection:preview/landing/resources" + data-cardSizes="6x2" + data-maxResults="6"></div> + </div> </div> - <div class="resource-widget resource-flow-layout col-16" - data-query="collection:preview/landing/resources" - data-cardSizes="6x6" - data-maxResults="6"></div> -</div></section> - - +</section>
\ No newline at end of file diff --git a/docs/html/preview/license.html b/docs/html/preview/license.html deleted file mode 100644 index deb16aa..0000000 --- a/docs/html/preview/license.html +++ /dev/null @@ -1,274 +0,0 @@ -<!DOCTYPE html> - -<html> -<head> - - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<meta name="viewport" content="width=970" /> - -<meta name="Description" content="To get started with the Android SDK Preview, you must agree to the following terms and conditions. As described below, please note that this is a preview version of the Android SDK, subject to change, that you use at your own risk."> -<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> -<title>License Agreement | Android Developers</title> - -<!-- STYLESHEETS --> -<link rel="stylesheet" -href="//fonts.googleapis.com/css?family=Roboto+Condensed"> -<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" - title="roboto"> -<link href="/assets/css/default.css" rel="stylesheet" type="text/css"> - - - -<!-- JAVASCRIPT --> -<script src="//www.google.com/jsapi" type="text/javascript"></script> -<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script> -<script type="text/javascript"> - var toRoot = "/"; - var metaTags = []; - var devsite = false; -</script> -<script src="/assets/js/docs.js" type="text/javascript"></script> - -<script> - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - - ga('create', 'UA-5831155-1', 'android.com'); - ga('create', 'UA-49880327-2', 'android.com', {'name': 'universal'}); // New tracker); - ga('send', 'pageview'); - ga('universal.send', 'pageview'); // Send page view for new tracker. -</script> - -</head> - - -<body class="gc-documentation" itemscope="" itemtype="http://schema.org/Article"> - - -<a name="top"></a> -<div id="body-content"> -<div class="fullpage"> -<div id="jd-content"> - <div class="jd-descr" itemprop="articleBody"> -<style> -body,html, #qv {background-color:#e9e9e9} - -#qv * { font-weight:bold;} - -.fullpage>#footer, -#jd-content>.content-footer.wrap { - display:none; -} - -.content-footer { - display: none; -} -</style> - - <div style="border-bottom: 1px solid #a5c43a; position: absolute; left: 0; right: 0; top: 0;"> - <div class="wrap" style="position: relative; height: 45px; padding: 0 20px;"> - <a href="/index.html" style="position:absolute;top:8px"> - <img src="/assets/images/dac_logo.png" srcset="/assets/images/dac_logo@2x.png 2x" width="123" height="25" alt="Android Developers home page"> - </a> - </div> - </div> - - <div class="landing-rest-of-page"> - <div class="landing-section" style="padding:55px 10px 0"> - -<div class="wrap"> - -<div class="col-16" id="doc-col" > - - <h1 itemprop="name" >L Developer Preview License Agreement</h1> - -<div class="jd-descr" itemprop="articleBody"> - <p> -If you are using the Android SDK -Preview, you must agree to the following terms -and conditions. As described below, please note that the preview version of the -Android SDK is subject to change, and that you use it at your own risk. The -Android SDK Preview is not a stable release, and may contain errors and defects -that can result in serious damage to your computer systems, devices and data. -</p> - -<p> -This is the Android SDK Preview License Agreement (the “License Agreement”). -</p> - -<div class="sdk-terms" style="height:auto;border:0;padding:0;width:940px"> -1. Introduction - -1.1 The Android SDK Preview (referred to in the License Agreement as the “Preview” and specifically including the Android system files, packaged APIs, and Preview library files, if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the Preview. - -1.2 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time. - -1.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States. - -2. Accepting the License Agreement - -2.1 In order to use the Preview, you must first agree to the License Agreement. You may not use the Preview if you do not accept the License Agreement. - -2.2 By clicking to accept and/or using the Preview, you hereby agree to the terms of the License Agreement. - -2.3 You may not use the Preview and may not accept the License Agreement if you are a person barred from receiving the Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Preview. - -2.4 If you will use the Preview internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Preview on behalf of your employer or other entity. - -3. Preview License from Google - -3.1 Subject to the terms of the License Agreement, Google grants you a royalty-free, non-assignable, non-exclusive, non-sublicensable, limited, revocable license to use the Preview, personally or internally within your company or organization, solely to develop applications to run on the Android platform. - -3.2 You agree that Google or third parties owns all legal right, title and interest in and to the Preview, including any Intellectual Property Rights that subsist in the Preview. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you. - -3.3 You may not use the Preview for any purpose not expressly permitted by the License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Preview or any part of the Preview; or (b) load any part of the Preview onto a mobile handset or any other hardware device except a personal computer, combine any part of the Preview with other software, or distribute any software or device incorporating a part of the Preview. - -3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Preview. - -3.5 Use, reproduction and distribution of components of the Preview licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights. - -3.6 You agree that the form and nature of the Preview that Google provides may change without prior notice to you and that future versions of the Preview may be incompatible with applications developed on previous versions of the Preview. You agree that Google may stop (permanently or temporarily) providing the Preview (or any features within the Preview) to you or to users generally at Google's sole discretion, without prior notice to you. - -3.7 Nothing in the License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features. - -3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Preview. - -4. Use of the Preview by You - -4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the Preview, including any intellectual property rights that subsist in those applications. - -4.2 You agree to use the Preview and write applications only for purposes that are permitted by (a) the License Agreement, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). - -4.3 You agree that if you use the Preview to develop applications, you will protect the privacy and legal rights of users. If users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If users provide you with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, each user has given you permission to do so. - -4.4 You agree that you will not engage in any activity with the Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Google or any third party. - -4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android and/or applications for Android, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so. - -4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under the License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach. - -4.7 The Preview is in development, and your testing and feedback are an important part of the development process. By using the Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Preview having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Preview as this Preview will no longer be supported after the official Android SDK is released. - -5. Your Developer Credentials - -5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials. - -6. Privacy and Information - -6.1 In order to continually innovate and improve the Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Preview are being used and how they are being used. Before any of this information is collected, the Preview will notify you and seek your consent. If you withhold consent, the information will not be collected. - -6.2 The data collected is examined in the aggregate to improve the Preview and is maintained in accordance with Google's Privacy Policy located at http://www.google.com/policies/privacy/. - -7. Third Party Applications - -7.1 If you use the Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources. - -7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners. - -7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. - -8. Using Google APIs - -8.1 Google APIs - -8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service. - -8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so. - -9. Terminating the License Agreement - -9.1 the License Agreement will continue to apply until terminated by either you or Google as set out below. - -9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the Preview and any relevant developer credentials. - -9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you. - -9.4 The License Agreement will automatically terminate without notice or other action upon the earlier of: -(A) when Google ceases to provide the Preview or certain parts of the Preview to users in the country in which you are resident or from which you use the service; and -(B) Google issues a final release version of the Android SDK. - -9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the Preview, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely. - -10. DISCLAIMERS - -10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE PREVIEW IS AT YOUR SOLE RISK AND THAT THE PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE. - -10.2 YOUR USE OF THE PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE PREVIEW IS NOT A STABLE RELEASE AND MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE. - -10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - -11. LIMITATION OF LIABILITY - -11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING. - -12. Indemnification - -12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ fees) arising out of or accruing from (a) your use of the Preview, (b) any application you develop on the Preview that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the License Agreement. - -13. Changes to the License Agreement - -13.1 Google may make changes to the License Agreement as it distributes new versions of the Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Preview is made available. - -14. General Legal Terms - -14.1 the License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Preview. - -14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google. - -14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the License Agreement will continue to be valid and enforceable. - -14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to the License Agreement. - -14.5 EXPORT RESTRICTIONS. THE PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE. - -14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google. - -14.7 The License Agreement, and your relationship with Google under the License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from the License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction. - - -</div> - </div> - </div> - -</div> - </div> <!-- end landing-body-content --> - - </div> - - <div class="content-footer wrap" itemscope="" - itemtype="http://schema.org/SiteNavigationElement"> - - <div class="paging-links layout-content-col col-10"> - - </div> - - </div> - - - - - </div> <!-- end jd-content --> - -<div id="footer" class="wrap" style="width:940px"> - - - <div id="copyright"> - - Except as noted, this content is - licensed under <a href="http://creativecommons.org/licenses/by/2.5/"> - Creative Commons Attribution 2.5</a>. For details and - restrictions, see the <a href="https://developer.android.com/license.html">Content - License</a>. - </div> - - -</div> <!-- end footer --> -</div><!-- end doc-content --> - -</div> <!-- end body-content --> - -</body> -</html> diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd index a352f65..8da052e 100644 --- a/docs/html/sdk/index.jd +++ b/docs/html/sdk/index.jd @@ -55,7 +55,6 @@ sdk.win_installer_checksum=e764ea93aa72766737f9be3b9fb3e42d879ab599 <style type="text/css"> .offline {display:none;} - a.download-bundle-button {display:block;} h2.feature { padding-top:30px; margin-top:0; @@ -66,19 +65,6 @@ sdk.win_installer_checksum=e764ea93aa72766737f9be3b9fb3e42d879ab599 padding-top:40px; } - .landing-button.green { - font-size:16px; - background-color:#90c653; - padding:8px 10px 10px; - margin:0; - width:206px; - text-align:center; - } - - .landing-button.green:hover { - background-color:#85b84f; - } - .landing-button .small { font-size: 12px; font-weight: normal; @@ -284,7 +270,7 @@ This is the Android Software Development Kit License Agreement <img src="{@docRoot}images/tools/studio-hero.png" srcset="{@docRoot}images/tools/studio-hero_2x.png 2x, {@docRoot}images/tools/studio-hero.png 1x" -width="760" height="400" alt="" style="margin-bottom:100px" /> +width="760" height="400" alt="" /> <div style="color: #fff; width:226px; height:0; overflow:visible; position:absolute; top:40px; left:25px"> @@ -300,7 +286,7 @@ width: 400px;text-align: center;">The official Android IDE</p> <li>Android 5.0 emulator system image with Google APIs</li> </ul> -<a class="online landing-button green download-bundle-button" style="margin-top:30px;" +<a class="online landing-button green download-bundle-button" href="#Other" >Download Android Studio</a> <!-- this appears when viewing the offline docs --> @@ -308,8 +294,9 @@ href="#Other" >Download Android Studio</a> To get Android Studio or stand-alone SDK tools, visit <a href="http://developer.android.com/sdk/index.html">developer.android.com/sdk/</a> </p> +</div> -<ul style="margin-top:50px;color:#444"> +<ul> <li><a href="#Requirements">System Requirements</a></li> <li><a href="#Other">Other Download Options</a></li> <li><a href="{@docRoot}sdk/installing/migrate.html">Migrating to Android Studio</a></li> @@ -317,7 +304,6 @@ href="http://developer.android.com/sdk/index.html">developer.android.com/sdk/</a target="_blank">Take a Survey</a></li> </ul> -</div> @@ -403,8 +389,7 @@ srcset="{@docRoot}images/tools/studio-hero-gradle_2x.png 2x, {@docRoot}images/to <p>Build APKs from Android Studio or the command line.</p> </div> - - +</div> <h2 class="feature norule">More about Android Studio</h2> <div style="background:#424242;padding:30px; color:#fff;margin:0 0 15px;"> |