From 98794c012c45369484df7abfa0bdf065447aff58 Mon Sep 17 00:00:00 2001 From: Dirk Dougherty Date: Sat, 9 May 2015 12:10:56 -0700 Subject: Doc change: add new engagement and other distribute files. Change-Id: I1c80d134b6637db9f763b6a587cdc5817a66b9be --- docs/html/design/index.jd | 8 +- docs/html/develop/index.jd | 68 +- docs/html/distribute/engage/ads.jd | 58 ++ docs/html/distribute/engage/appindexing.jd | 61 ++ docs/html/distribute/engage/deep-linking.jd | 35 +- docs/html/distribute/engage/engage_toc.cs | 23 +- docs/html/distribute/engage/index.jd | 11 +- docs/html/distribute/engage/intents.jd | 39 + docs/html/distribute/index.jd | 8 +- docs/html/distribute/monetize/ads.jd | 229 +++--- docs/html/distribute/monetize/monetize_toc.cs | 2 +- docs/html/distribute/users/appindexing.jd | 46 ++ docs/html/distribute/users/promote-with-ads.jd | 147 +++- docs/html/distribute/users/users_toc.cs | 22 +- docs/html/images/distribute/appindexing.gif | Bin 0 -> 3740940 bytes docs/html/images/distribute/engage-intents.png | Bin 0 -> 223476 bytes .../html/images/distribute/more-app-engagement.png | Bin 0 -> 212366 bytes docs/html/images/distribute/music-action.png | Bin 0 -> 285034 bytes docs/html/images/distribute/promote-ads-apps.png | Bin 0 -> 431927 bytes docs/html/images/distribute/promote-ads-web.png | Bin 0 -> 567730 bytes docs/html/images/distribute/promote_ads.png | Bin 0 -> 121258 bytes docs/html/images/distribute/promote_ads_apps.png | Bin 0 -> 155480 bytes docs/html/images/distribute/promote_ads_gmail.png | Bin 0 -> 74387 bytes docs/html/images/distribute/promote_ads_inapp.png | Bin 0 -> 159043 bytes docs/html/images/distribute/promote_ads_play.png | Bin 0 -> 109160 bytes docs/html/images/distribute/promote_ads_search.png | Bin 0 -> 146234 bytes docs/html/images/distribute/promote_ads_web.png | Bin 0 -> 212006 bytes .../html/images/distribute/promote_ads_youtube.png | Bin 0 -> 157263 bytes docs/html/index.jd | 7 +- docs/html/jd_collections.js | 98 ++- docs/html/jd_extras.js | 313 +++++-- docs/html/preview/data-binding/guide.jd | 908 +++++++++++++++++++++ docs/html/preview/index.html | 372 --------- docs/html/preview/index.jd | 44 +- docs/html/preview/license.html | 274 ------- docs/html/sdk/index.jd | 25 +- 36 files changed, 1825 insertions(+), 973 deletions(-) create mode 100644 docs/html/distribute/engage/ads.jd create mode 100644 docs/html/distribute/engage/appindexing.jd create mode 100644 docs/html/distribute/engage/intents.jd create mode 100644 docs/html/distribute/users/appindexing.jd create mode 100644 docs/html/images/distribute/appindexing.gif create mode 100644 docs/html/images/distribute/engage-intents.png create mode 100644 docs/html/images/distribute/more-app-engagement.png create mode 100644 docs/html/images/distribute/music-action.png create mode 100644 docs/html/images/distribute/promote-ads-apps.png create mode 100644 docs/html/images/distribute/promote-ads-web.png create mode 100644 docs/html/images/distribute/promote_ads.png create mode 100644 docs/html/images/distribute/promote_ads_apps.png create mode 100644 docs/html/images/distribute/promote_ads_gmail.png create mode 100644 docs/html/images/distribute/promote_ads_inapp.png create mode 100644 docs/html/images/distribute/promote_ads_play.png create mode 100644 docs/html/images/distribute/promote_ads_search.png create mode 100644 docs/html/images/distribute/promote_ads_web.png create mode 100644 docs/html/images/distribute/promote_ads_youtube.png create mode 100644 docs/html/preview/data-binding/guide.jd delete mode 100644 docs/html/preview/index.html delete mode 100644 docs/html/preview/license.html (limited to 'docs/html') diff --git a/docs/html/design/index.jd b/docs/html/design/index.jd index 638f35b27929..1ffb0a30e566 100644 --- a/docs/html/design/index.jd +++ b/docs/html/design/index.jd @@ -41,8 +41,12 @@ footer.hide=1 - -
+ +

Latest

+
-

Start!

+

Get Started with Android

- 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.

+ +

- + Set up Android Studio
- + - Make your first app + Build your first app
- + Learn about Android
+ + + Sample projects +
-
+
+ -
+

Latest

+
+

Tools for building apps

+
+ Insights into Android's tools and libraries to speed your development. +
+
+ +

Android performance patterns

@@ -69,21 +93,8 @@ excludeFromSuggestions=true
-
-

Tools for building apps

-
- Insights into Android's tools and libraries to speed your development. -
-
- -
- -
-

Ubiquitous computing

+
+

Ubiquitous computing on Android

Opening up new stuff.
@@ -107,9 +118,10 @@ excludeFromSuggestions=true
-
-

Courses

-
Free online courses from Android experts that bring you step-by-step to building your own apps.
+
+

Online Courses

+
Free online courses from Android + experts that bring you step-by-step to building your own apps.
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.

+ +

+ Get started with AdWords mobile + app engagement campaigns. +

+ +
+
+

From search

+ +

Add deep links to your app, then bring users straight + to relevant app content when they’re searching.

+
+
+

From apps

+ +

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.

+
+
+ +

Tips

+ +
    +
  • Track what users do in your app after they click an ad, by installing the + AdWords conversion tracking + SDK. +
  • Advertise a compelling reason for users to re-engage with your app, such as a + reminder or a special offer. +
  • Add deep links to + your app and bring users directly to the most relevant and interesting + parts of your app, where they can easily take action. +
  • Re-engage with your app users across the Display Network with remarketing lists +and search with keywords. +
  • Use remarketing lists to target high value users so that you can drive more +conversions in your app. +
+ + + +
+
+ diff --git a/docs/html/distribute/engage/appindexing.jd b/docs/html/distribute/engage/appindexing.jd new file mode 100644 index 000000000000..2b8f315a49c8 --- /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 + +

Use the features of Google Search for Android to drive the use of your apps:

+ +
    +
  • Once users have installed your app, search can bring them back with deep-links direct to your app.
  • +
  • When users use voice commands to ask Google to perform a task, your app can be one of those +completing the task.
  • + +
  • You can also take advantage of Google Now 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.
  • +
+ +

Start now by indexing your app, then take advantage of Voice Actions, the App Indexing API, and Google Now Cards.

+ + +

Help Users Find Your Information

+ +

Re-engage with your users with deep-links displayed in search results, links +that take users directly to content within your app.

+ + +
+ +
+

Empower your users to get things done in your app

+ +

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.

+ +
+ +
+ + +

Assist your users where and when they need it

+ +
+ +
+ +

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.

+ + + +
+ + diff --git a/docs/html/distribute/engage/deep-linking.jd b/docs/html/distribute/engage/deep-linking.jd index ea1f1debf13b..b8d974c4705a 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.

-
-
- -

+ +

+ +
+ +

G+ Post with Deep Link to Buy

-
+
-
- -

+

+ +

Purchase page within app

-
- -
-

Deep Linking from Google Search — App Indexing

+

Deep Linking from Google Search — App Indexing

@@ -65,15 +64,15 @@ page.image=images/cards/google-search_2x.png content.

-
-
- -
-
-

Deep Linking from Google Ads

+

Deep Linking from Google Ads

+ + +
+
+

Ads can remind users about the apps they already have.

diff --git a/docs/html/distribute/engage/engage_toc.cs b/docs/html/distribute/engage/engage_toc.cs index eb176f941b0d..4639d5500be0 100644 --- a/docs/html/distribute/engage/engage_toc.cs +++ b/docs/html/distribute/engage/engage_toc.cs @@ -31,16 +31,35 @@ + + + + diff --git a/docs/html/distribute/users/appindexing.jd b/docs/html/distribute/users/appindexing.jd new file mode 100644 index 000000000000..6a3fec629fc8 --- /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 + +

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.

+ +
+ +
+ +

This free service expands your opportunities to turn the investment you’ve made +in creating an outstanding app or game into installs.

+ +

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 instructions.

+ +

Once your app is index, links to its content will join the 30 billion app index +links already available to Google Search.

+ +

Tips

+ +
    +
  • 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. +
  • 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. +
  • Use the App Indexing API to help users discover relevant content in your app +before they complete a query with auto-completions. +
+ + + +
+ diff --git a/docs/html/distribute/users/promote-with-ads.jd b/docs/html/distribute/users/promote-with-ads.jd index c1d79fcd8db8..d71b8c9a8400 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 -

- 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. -

- -

- AdMob 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. - - Sign up for AdMob. -

- -

- 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. - Learn - More. -

-
- +

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.

+ + +

Drive installs

+ +

AdWords 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.

+ +

Get started with AdWords app install ads.

+ +
+
+

From Google Play

+ +

Search ads on Google Play are still undergoing testing and not yet available to +buy. Find out more.

+
+
+

From apps

+ +

Connect with users as they search for content and services provided by your +app.

+
-
- +
+
+

From YouTube

+ +

Promote your app when users are watching related videos.

+
+
+

From apps

+ +

Reach users while they’re engaged with apps and games across the AdMob network.

+
+
+ +
+
+

From the web

+ +

Reach users while they’re engaged with websites across the Google Display Network.

+
+
+

From Gmail

+ +

Promote your app while users communicate and get things done in Gmail.

+
+
+ +

Tips

+ +
    +
  • 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. +
  • Ensure that your ads and Play Store listing are compelling and clearly describe +your app’s value. +
  • Check that you’re accurately tracking and attributing installs by installing +the AdWords conversion tracking SDK. +
  • Promote your app broadly across display, search, and video to reach even more +potential users and drive a higher volume of installs. +
  • Start with broader targeting and then fine tune your bidding once you’ve +assessed your campaign results. +
  • Use Conversion Optimizer to automate your bidding so that your ads target users +who are most likely to install your app. +
  • 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. +
+ + +

Engage with users

+ +

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.

+ +
+
+

From search

+ +

Add deep links to your app, then bring users straight + to relevant app content when they’re searching.

+
+
+

From apps

+ +

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.

+
+

Tips

+ +
    +
  • Track what users do in your app after they’ve clicked an ad, by installing the +AdWords conversion tracking SDK. +
  • Advertise a compelling reason for users to re-engage with your app (such as a +reminder or a special offer). +
  • Add deep links 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. +
  • Re-engage your app users across the display network with remarketing lists and +search with keywords. +
  • Use remarketing lists to target high value users so that you can drive more +conversions in your app. +
+ + +
+ diff --git a/docs/html/images/distribute/appindexing.gif b/docs/html/images/distribute/appindexing.gif new file mode 100644 index 000000000000..6015d143861d Binary files /dev/null and b/docs/html/images/distribute/appindexing.gif differ diff --git a/docs/html/images/distribute/engage-intents.png b/docs/html/images/distribute/engage-intents.png new file mode 100644 index 000000000000..2889c087dad4 Binary files /dev/null and b/docs/html/images/distribute/engage-intents.png differ diff --git a/docs/html/images/distribute/more-app-engagement.png b/docs/html/images/distribute/more-app-engagement.png new file mode 100644 index 000000000000..31cbede29694 Binary files /dev/null and b/docs/html/images/distribute/more-app-engagement.png differ diff --git a/docs/html/images/distribute/music-action.png b/docs/html/images/distribute/music-action.png new file mode 100644 index 000000000000..24d6dc8953e4 Binary files /dev/null and b/docs/html/images/distribute/music-action.png differ diff --git a/docs/html/images/distribute/promote-ads-apps.png b/docs/html/images/distribute/promote-ads-apps.png new file mode 100644 index 000000000000..9009a3720df2 Binary files /dev/null and b/docs/html/images/distribute/promote-ads-apps.png differ diff --git a/docs/html/images/distribute/promote-ads-web.png b/docs/html/images/distribute/promote-ads-web.png new file mode 100644 index 000000000000..2f9630ef6e8e Binary files /dev/null and b/docs/html/images/distribute/promote-ads-web.png differ diff --git a/docs/html/images/distribute/promote_ads.png b/docs/html/images/distribute/promote_ads.png new file mode 100644 index 000000000000..38517aa93c60 Binary files /dev/null and b/docs/html/images/distribute/promote_ads.png differ diff --git a/docs/html/images/distribute/promote_ads_apps.png b/docs/html/images/distribute/promote_ads_apps.png new file mode 100644 index 000000000000..2f578651e7f4 Binary files /dev/null and b/docs/html/images/distribute/promote_ads_apps.png differ diff --git a/docs/html/images/distribute/promote_ads_gmail.png b/docs/html/images/distribute/promote_ads_gmail.png new file mode 100644 index 000000000000..1d21b4a3cdf9 Binary files /dev/null and b/docs/html/images/distribute/promote_ads_gmail.png differ diff --git a/docs/html/images/distribute/promote_ads_inapp.png b/docs/html/images/distribute/promote_ads_inapp.png new file mode 100644 index 000000000000..8aeee579b44e Binary files /dev/null and b/docs/html/images/distribute/promote_ads_inapp.png differ diff --git a/docs/html/images/distribute/promote_ads_play.png b/docs/html/images/distribute/promote_ads_play.png new file mode 100644 index 000000000000..1cf51b273f9c Binary files /dev/null and b/docs/html/images/distribute/promote_ads_play.png differ diff --git a/docs/html/images/distribute/promote_ads_search.png b/docs/html/images/distribute/promote_ads_search.png new file mode 100644 index 000000000000..27c0b38e2f04 Binary files /dev/null and b/docs/html/images/distribute/promote_ads_search.png differ diff --git a/docs/html/images/distribute/promote_ads_web.png b/docs/html/images/distribute/promote_ads_web.png new file mode 100644 index 000000000000..588a3d4487a1 Binary files /dev/null and b/docs/html/images/distribute/promote_ads_web.png differ diff --git a/docs/html/images/distribute/promote_ads_youtube.png b/docs/html/images/distribute/promote_ads_youtube.png new file mode 100644 index 000000000000..e88a7965f6de Binary files /dev/null and b/docs/html/images/distribute/promote_ads_youtube.png differ diff --git a/docs/html/index.jd b/docs/html/index.jd index cfbe7b67d671..ffc676953b09 100644 --- a/docs/html/index.jd +++ b/docs/html/index.jd @@ -10,7 +10,10 @@ page.customHeadTag= -
+
+ + +
@@ -32,7 +35,7 @@ page.customHeadTag=
+

Build Beautiful Apps

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 834eac11be04..c89b31075d46 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 cc11da529f85..150a9d4ca155 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", @@ -1444,20 +1446,6 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "type": "distribute", "titleFriendly": "" }, - { - "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": "", @@ -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": [], @@ -2341,6 +2510,54 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "lang":"en", "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", @@ -2348,7 +2565,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([ "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 000000000000..49b690f91262 --- /dev/null +++ b/docs/html/preview/data-binding/guide.jd @@ -0,0 +1,908 @@ +page.title=Data Binding Guide + +@jd:body +

Data Binding allows you write declarative layouts and minimize the glue code +that is necessary to bind your application logic and layouts.

+ + +

Build Environment

+ + +

Setting Up Work Environment:

+ +

Data Binding EAP only supports gradle.

+ +

To set up your application, unzip the provided bundle to a location. It has 3 +sections

+ +
    +
  • maven-repo: which keeps the data-binding libraries +
  • samples: Sample applications +
  • databinding.properties: Properties file that can be used to integrate with your app +
+ +

Add the following section to the project’s build.gradle file (not the module's +build.gradle) and replace with the absolute path of the bundle that you’ve unzipped in the previous step.

+ +
+buildscript {
+   def eapFolder = '<BUNDLE_FOLDER>'
+   def Properties props = new Properties()
+   props.load(new FileInputStream("${eapFolder}/databinding.properties"))
+   props.mavenRepoDir = "${eapFolder}/${props.mavenRepoName}"
+   ext.config = props
+   repositories {
+       jcenter()
+       maven {
+           url config.mavenRepoDir
+       }
+   }
+   dependencies {
+       classpath "com.android.tools.build:gradle:1.1.3"
+       classpath "com.android.databinding:dataBinder:${config.snapshotVersion}"
+   }
+}
+allprojects {
+   repositories {
+       jcenter()
+       maven {
+           url config.mavenRepoDir
+       }
+   }
+}
+
+ +

Next, add the following lines to the build.gradle +file of each module that will use data-binding. The application module must +have this, even if only its libraries use data binding.

+ +
+apply plugin: 'com.android.databinding'
+dependencies {
+    compile "com.android.databinding:library:${config.snapshotVersion}"
+    compile "com.android.databinding:baseLibrary:${config.snapshotVersion}"
+    compile "com.android.databinding:adapters:${config.snapshotVersion}"
+    provided "com.android.databinding:annotationprocessor:${config.snapshotVersion}"
+}
+
+ + +

Data Binding Layout Files

+ + +

Writing your first data binding expressions:

+ +

Data-binding layout files are slightly different and start with a root tag of +layout followed by a data element and a +view root element. This view element is what your root would +be in a non-binding layout file.A sample file looks like this:

+ +
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+   <data>
+       <variable name="user" type="com.example.User"/>
+   </data>
+   <LinearLayout
+       android:orientation="vertical"
+       android:layout_width="match_parent"
+       android:layout_height="match_parent">
+       <TextView android:layout_width="wrap_content"
+           android:layout_height="wrap_content"
+           android:text="@{user.firstName}"/>
+       <TextView android:layout_width="wrap_content"
+           android:layout_height="wrap_content"
+           android:text="@{user.lastName}"/>
+   </LinearLayout>
+</layout>
+
+ +

The user variable within data describes a property that may be used within this layout.

+ +
+<variable name="user" type="com.example.User"/>
+
+ +

Expressions within the layout are written in the attribute properties using the +“@{}” syntax. Here, the TextView’s text is set to the firstName property of user:

+
+<TextView android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:text="@{user.firstName}"/>
+
+ + +

Data Object

+ +

Let’s assume for now that you have a plain-old Java object (POJO) for User:

+
+public class User {
+   public final String firstName;
+   public final String lastName;
+   public User(String firstName, String lastName) {
+       this.firstName = firstName;
+       this.lastName = lastName;
+   }
+}
+
+ +

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:

+
+public class User {
+   private final String firstName;
+   private final String lastName;
+   public User(String firstName, String lastName) {
+       this.firstName = firstName;
+       this.lastName = lastName;
+   }
+   public String getFirstName() {
+       return this.firstName;
+   }
+   public String getLastName() {
+       return this.lastName;
+   }
+}
+
+ +

From the perspective of data binding, these two classes are equivalent. The +expression @{user.lastName} used for the TextView’s android:text attribute will access the firstName field in the former class and the getFirstName() method in the latter class. +

Binding Data

+ +

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 activity_main.xml so the generate class was ActivityMainBinding. This class holds all the bindings from the layout properties (e.g. the user 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: +

+ +
+@Override
+protected void onCreate(Bundle savedInstanceState) {
+   super.onCreate(savedInstanceState);
+   ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.main_activity);
+   User user = new User("Test", "User");
+   binding.setUser(user);
+}
+
+ +

You’re done! Run the application and you’ll see Test User in the UI.Alternatively, you can get the view via: +

+MainActivityBinding binding = MainActivityBinding.inflate(getLayoutInflater());
+
+ +

If you are using data binding items inside a ListView or RecyclerView adapter, +you may prefer to use: +

+ListItemBinding binding = ListItemBinding.inflate(layoutInflater, viewGroup,
+false);
+//or
+ListItemBinding binding = DataBindingUtil.inflate(layoutInflater, R.layout.list_item, viewGroup, false);
+
+ + +

Layout Details

+ + +

Imports

+ +

Zero or more import elements may be used inside the data element. These allow easy reference to classes inside your layout file, just +like in Java. +

+<data>
+    <import type="android.view.View"/>
+</data>
+
+ +

Now, View may be used within your binding expression: +

+<TextView
+   android:text="@{user.lastName}"
+   android:layout_width="wrap_content"
+   android:layout_height="wrap_content"
+   android:visibility="@{user.isAdult ? View.VISIBLE : View.GONE}"/>
+
+ +

When there are class name conflicts, one of the classes may be renamed to an +“alias:”

+
+<import type="android.view.View"/>
+<import type="com.example.real.estate.View"
+        alias="Vista"/>
+
+ +

Now, Vista may be used to reference the com.example.real.estate.View and View may be used to reference android.view.View within the layout file.Imported types may be used as type references in variables and expressions:

+
+<data>
+    <import type="com.example.User"/>
+    <import type="java.util.List"/>
+    <variable name="user" type="User"/>
+    <variable name="userList" type="List<User>"/>
+</data>
+…
+<TextView
+   android:text="@{((User)(user.connection)).lastName}"
+   android:layout_width="wrap_content"
+   android:layout_height="wrap_content"/>
+
+ +

Imported types may also be used when referencing static fields and methods in +expressions:

+
+<data>
+    <import type="com.example.MyStringUtils"/>
+    <variable name="user" type="com.example.User"/>
+</data>
+…
+<TextView
+   android:text="@{MyStringUtils.capitalize(user.lastName)}"
+   android:layout_width="wrap_content"
+   android:layout_height="wrap_content"/>
+
+ +

Just as in Java, java.lang.* is imported automatically.

+

Variables

+ +

Any number of variable elements may be used inside the data element. Each variable element describes a property that may be set on the layout to be used in +binding expressions within the layout file.

+
+<data>
+    <import type="android.graphics.drawable.Drawable"/>
+    <variable name="user"  type="com.example.User"/>
+    <variable name="image" type="Drawable"/>
+    <variable name="note"  type="String"/>
+</data>
+
+ +

The variable types are inspected at compile time, so if a variable implements Observable, observable collection, 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 not be observed!

+ +

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.

+ +

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 — null for reference types, 0 for int, false for boolean, etc.

+ +

Custom Binding Class Names

+ +

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 contact_item.xml will generate ContactItemBinding. If the module package is com.example.my.app, then it will be placed in com.example.my.app.databinding.

+ +

Binding classes may be renamed or placed in different packages by adjusting the class attribute of the data element. For example:

+
+<data class="ContactItem">
+    ...
+</data>
+
+ +

This generates the binding class as ContactItem 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 “.”:

+
+<data class=".ContactItem">
+    ...
+</data>
+
+ +In this case, ContactItem is generated in the module package directly.Any package may be used if the full package is provided: +
+<data class="com.example.ContactItem">
+    ...
+</data>
+
+ + +

Includes

+ +

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:

+
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android"
+        xmlns:bind="http://schemas.android.com/apk/res-auto">
+   <data>
+       <variable name="user" type="com.example.User"/>
+   </data>
+   <LinearLayout
+       android:orientation="vertical"
+       android:layout_width="match_parent"
+       android:layout_height="match_parent">
+       <include layout="@layout/name"
+           bind:user="@{user}"/>
+       <include layout="@layout/contact"
+           bind:user="@{user}"/>
+   </LinearLayout>
+</layout>
+
+ +

Here, there must be a user variable in both the name.xml and contact.xml layout files.

+

Expression Language

+ + +

Common Features

+ +

The expression language looks a lot like a Java expression. These are the same:

+
    +
  • Mathematical + - / * % +
  • String concatenation + +
  • Logical && || +
  • Binary & | ^ +
  • Unary + - ! ~ +
  • Shift >> >>> << +
  • Comparison == > < >= <= +
  • instanceof +
  • Grouping () +
  • Literals - character, String, numeric, null +
  • Cast +
  • Method calls +
  • Field access +
  • Array access [] +
  • Ternary operator ?: +
+

Examples:

+
+android:text="@{String.valueOf(index + 1)}"
+android:visibility="@{age < 13 ? View.GONE : View.VISIBLE}"
+android:transitionName='@{"image_" + id}'
+
+ + +

Missing Operations

+ +

A few operations are missing from the expression syntax that you can use in +Java.

+
    +
  • this +
  • super +
  • new +
  • Explicit generic invocation +
+ +

Null Coalescing Operator

+ +

The null coalescing operator (??) chooses the left operand if it is not null or the right if it is null.

+
+android:text="@{user.displayName ?? user.lastName}"
+
+ +

This is functionally equivalent to:

+
+android:text="@{user.displayName != null ? user.displayName : user.lastName}"
+
+ + +

Property Reference

+ +

The first was already discussed in the Writing your first data binding expressions above: short form JavaBean references. When an expression references a +property on a class, it uses the same format for fields, getters, and +ObservableFields.

+
+android:text="@{user.lastName}"
+
+ + +

Collections

+ +

Common collections: arrays, lists, sparse lists, and maps, may be accessed +using the [] operator for convenience.

+
+<data>
+    <import type="android.util.SparseArray"/>
+    <import type="java.util.Map"/>
+    <import type="java.util.List"/>
+    <variable name="list" type="List<String>"/>
+    <variable name="sparse" type="SparseArray<String>"/>
+    <variable name="map" type="Map<String, String>"/>
+    <variable name="index" type="int"/>
+    <variable name="key" type="String"/>
+</data>
+…
+android:text="@{list[index]}"
+…
+android:text="@{sparse[index]}"
+…
+android:text="@{map[key]}"
+
+
+ + +

String Literals

+ +

When using single quotes around the attribute value, it is easy to use double +quotes in the expression:

+
+android:text='@{map["firstName"]}'
+
+ +

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 (`).

+
+android:text="@{map[`firstName`}"
+android:text="@{map["firstName"]}"
+
+ + +

Resources

+ +

It is possible to access resources as part of expressions using the normal +syntax:

+
+android:padding="@{large? @dimen/largePadding : @dimen/smallPadding}"
+
+ +

Format strings and plurals may be evaluated by providing parameters:

+
+android:text="@{@string/nameFormat(firstName, lastName)}"
+android:text="@{@plurals/banana(bananaCount)}"
+
+ +

Some resources require explicit type evaluation.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNormal ReferenceExpression Reference
+
+String[]
+@array +@stringArray
+int[] +@array +@intArray
+TypedArray +@array +@typedArray
+Animator +@animator +@animator
+StateListAnimator +@animator +@stateListAnimator
+ + +color int +
+@color
+@color
+ColorStateList +@color +@colorStateList
+ + + + +

Data Objects

+ + +

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, Observable objects, ObservableFields, and observable collections.

+ +

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.

+ +

Observable Objects

+ + +

A class implementing android.databinding.Observable interface will allow the binding to attach a single listener to a bound object +to listen for changes of all properties on that object.

+ +

The Observable interface has a mechanism to add and remove listeners, but notifying is up to +the developer. To make development easier, a base class, BaseObservable, 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 Bindable annotation to the getter and notifying in the setter.

+ +
+private static class User extends BaseObservable {
+   private String firstName;
+   private String lastName;
+   @Bindable
+   public String getFirstName() {
+       return this.firstName;
+   }
+   @Bindable
+   public String getFirstName() {
+       return this.lastName;
+   }
+   public void setFirstName(String firstName) {
+       this.firstName = firstName;
+       notifyPropertyChanged(BR.firstName);
+   }
+   public void setLastName(String lastName) {
+       this.lastName = lastName;
+       notifyPropertyChanged(BR.lastName);
+   }
+}
+
+ +

The Bindable 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 Observable interface may be implemented using the convenient PropertyChangeRegistry to store and notify listeners efficiently.

+ +

ObservableFields

+ +

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:

+
+private static class User extends BaseObservable {
+   public final ObservableField<String> firstName =
+       new ObservableField<>();
+   public final ObservableField<String> lastName =
+       new ObservableField<>();
+   public final ObservableInt age = new ObservableInt();
+}
+
+ +

That's it! To access the value, use the set and get accessor methods:

+
+user.firstName.set("Google");
+int age = user.age.get();
+
+ + +

Observable Collections

+ +

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.

+ +
+ObservableArrayMap<String, Object> user = new ObservableArrayMap<>();
+user.put("firstName", "Google");
+user.put("lastName", "Inc.");
+user.put("age", 17);
+
+ +In the layout, the map may be accessed through the String keys: +
+<data>
+    <import type="android.databinding.ObservableMap"/>
+    <variable name="user" type="ObservableMap<String, Object>"/>
+</data>
+…
+<TextView
+   android:text='@{user["lastName"]}'
+   android:layout_width="wrap_content"
+   android:layout_height="wrap_content"/>
+<TextView
+   android:text='@{String.valueOf(1 + (Integer)user["age"])}'
+   android:layout_width="wrap_content"
+   android:layout_height="wrap_content"/>
+
+ +

ObservableArrayList is useful when the key is an integer:

+
+ObservableArrayList<Object> user = new ObservableArrayList<>();
+user.add("Google");
+user.add("Inc.");
+user.add(17);
+
+ +

In the layout, the list may be accessed through the indices:

+
+<data>
+    <import type="android.databinding.ObservableList"/>
+    <import type="com.example.my.app.Fields"/>
+    <variable name="user" type="ObservableList<Object>"/>
+</data>
+…
+<TextView
+   android:text='@{user[Fields.LAST_NAME]}'
+   android:layout_width="wrap_content"
+   android:layout_height="wrap_content"/>
+<TextView
+   android:text='@{String.valueOf(1 + (Integer)user[Fields.AGE])}'
+   android:layout_width="wrap_content"
+   android:layout_height="wrap_content"/>
+
+ + +

Generated Binding

+ +

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 customized. The Generated binding classes all extend android.databinding.ViewDataBinding.

+

Creating

+ +

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.

+
+MyLayoutBinding binding = MyLayoutBinding.inflate(this);
+MyLayoutBinding binding = MyLayoutBinding.inflate(viewGroup);
+
+ +

If the layout was inflated using a different mechanism, it may be bound +separately:

+
+MyLayoutBinding binding = MyLayoutBinding.bind(viewRoot);
+
+ +

Sometimes the binding cannot be known in advance. In such cases, the binding +can be created using the DataBindingUtil class:

+
+ViewDataBinding binding = DataBindingUtil.inflate(context, layoutId,
+    parent, attachToParent);
+ViewDataBinding binding = DataBindingUtil.bindTo(viewRoot, layoutId);
+
+ + +

Views With IDs

+ +

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:

+
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+   <data>
+       <variable name="user" type="com.example.User"/>
+   </data>
+   <LinearLayout
+       android:orientation="vertical"
+       android:layout_width="match_parent"
+       android:layout_height="match_parent">
+       <TextView android:layout_width="wrap_content"
+           android:layout_height="wrap_content"
+           android:text="@{user.firstName}"
+           android:id="@+id/firstName"/>
+       <TextView android:layout_width="wrap_content"
+           android:layout_height="wrap_content"
+           android:text="@{user.lastName}"           android:id="@+id/lastName"/>
+   </LinearLayout>
+</layout>
+
+ +Will generate a binding class with: +
+public final TextView firstName;
+public final TextView lastName;
+
+ +

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.

+

Variables

+ +

Each variable will be given a accessor methods.

+
+<data>
+    <import type="android.graphics.drawable.Drawable"/>
+    <variable name="user"  type="com.example.User"/>
+    <variable name="image" type="Drawable"/>
+    <variable name="note"  type="String"/>
+</data>
+
+ +

will generate setters and getters in the binding:

+
+public abstract com.example.User getUser();
+public abstract void setUser(com.example.User user);
+public abstract Drawable getImage();
+public abstract void setImage(Drawable image);
+public abstract String getNote();
+public abstract void setNote(String note);
+
+ + +

ViewStubs

+ +

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.

+ +

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.

+ +

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.

+ +

Advanced Binding

+ + +

Dynamic Variables

+ +

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.

+ +

In this example, all layouts that the RecyclerView binds to have an "item" +variable. The BindingHolder has a getBinding method returning the ViewDataBinding base.

+
+public void onBindViewHolder(BindingHolder holder, int position) {
+   final T item = mItems.get(position);
+   holder.getBinding().setVariable(BR.item, item);
+   holder.getBinding().executePendingBindings();
+}
+
+ + +

Immediate Binding

+ +

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.

+

Attribute Setters

+ +

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.

+

Automatic Setters

+ +For an attribute, data binding tries to find the method setAttribute. The +namespace for the attribute does not matter, only the attribute name itself. + +

For example, an expression associated with TextView's attribute android:text 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.

+
+<android.support.v4.widget.DrawerLayout
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    app:scrimColor="@{@color/scrim}"
+    app:drawerListener="@{fragment.drawerListener}"/>
+
+ + +

Renamed Setters

+ +

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 android:tint attribute is really associated with setImageTintList, not setTint.

+
+@BindingMethods({
+       @BindingMethod(type = "android.widget.ImageView",
+                      attribute = "android:tint",
+                      method = "setImageTintList"),
+})
+
+ +

It is unlikely that developers will need to rename setters; the android +framework attributes have already been implemented.

+

Custom Setters

+ +

Some attributes need custom binding logic. For example, there is no associated +setter for the android:paddingLeft 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.

+ +

The android attributes have already had BindingAdapters created. For example, +here is the one for paddingLeft:

+

+@BindingAdapter("android:paddingLeft") +public static void setPaddingLeft(View view, int padding) { + view.setPadding(padding, + view.getPaddingTop(), + view.getPaddingRight(), + view.getPaddingBottom()); +} +
+ +

Binding adapters are useful for other types of customization. For example, a + custom loader can be called off-thread to load an image.

+ +

Developer-created binding adapters will override the data binding default +adapters when there is a conflict.

+ +

You can also have adapters that receive multiple parameters.

+
+@BindingAdapter(attributes = {"bind:imageUrl", "bind:error"})
+public static void loadImage(ImageView view, String url, Drawable error) {
+   Picasso.with(view.getContext()).load(url).error(error).into(view);
+}
+
+ +

This adapter will be called if both imageUrl and error are used for an ImageView and imageUrl is a string and error is a drawable.

+
    +
  • Custom namespaces are ignore during matching. +
  • You can also write adapters for android namespace. +
+ +
+<ImageView app:imageUrl=“@{venue.imageUrl}”
+app:error=“@{@drawable/venueError}”/>
+
+ + +

Converters

+ + +

Object Conversions

+ +

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.

This is a convenience for those using ObservableMaps to hold data. for example:

+
+<TextView
+   android:text='@{userMap["lastName"]}'
+   android:layout_width="wrap_content"
+   android:layout_height="wrap_content"/>
+
+ +

The userMap returns an Object and that Object will be automatically cast to +parameter type found in the setter setText(CharSequence). When there may be confusion about the parameter type, the developer will need +to cast in the expression.

+

Custom Conversions

+ +

Sometimes conversions should be automatic between specific types. For example, +when setting the background:

+
+<View
+   android:background="@{isError ? @color/red : @color/white}"
+   android:layout_width="wrap_content"
+   android:layout_height="wrap_content"/>
+
+ +

Here, the background takes a Drawable, but the color is an integer. Whenever a Drawable is expected and an integer is returned, the int should be converted to a ColorDrawable. This conversion is done using a static method with a BindingConversion +annotation:

+
+@BindingConversion
+public static ColorDrawable convertColorToDrawable(int color) {
+   return new ColorDrawable(color);
+}
+
+ +

Note that conversions only happen at the setter level, so it is not allowed to mix types like this:

+
+<View
+   android:background="@{isError ? @drawable/error : @color/white}"
+   android:layout_width="wrap_content"
+   android:layout_height="wrap_content"/>
+
+ diff --git a/docs/html/preview/index.html b/docs/html/preview/index.html deleted file mode 100644 index af99e2d812a7..000000000000 --- a/docs/html/preview/index.html +++ /dev/null @@ -1,372 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Android M Developer Preview | Android Developers - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - - - - - -
-
-
-
-
Android M Developer Preview
-
- Get an early look at the next release and prepare your apps for the - official platform launch. -
- - - -
-
-
- - - -
-
-
-
- -
-
-

This Feature

-

- Kevin ham hock pig cupim brisket picanha, doner pork tri-tip frankfurter - leberkas turkey. -

-

- Learn about this feature -

-
-
-

That Feature

-

- Bacon ipsum dolor amet meatball tongue pork loin fatback, andouille shoulder - chicken picanha pig landjaeger kielbasa shankle pastrami flank meatloaf. -

-

- Learn about that feature -

-
-
-

Another Feature

-

- Landjaeger tri-tip tenderloin pork loin jowl, meatloaf t-bone kielbasa sausage - swine spare ribs drumstick corned beef ham. -

-

- Learn about notifications -

-
-
-

Moar Features

-

- Feature Name is our effort to meatloaf boudin meatball sausage strip - steak hamburger, chuck ham pork chop. -

-

- Learn about moar feature -

-
-
-

See the API - overview for more information on the rest of the new and updated features.

-
-
-
-
-
-
-
- - - -
-

Issue Tracker

-

- Let us know when you encounter problems, so we can fix them and make - the platform better for you and your users. -

- - Report Issues -

-

-
-
-
- - - -
-

Google+

-

- Join the community of Android developers testing out the M Developer Preview and - share your thoughts and experiences. -

- - Discuss on Google+ -

-
-
-
- - - -
-

Support and Updates

-

- Updates to the preview are delivered - in the Android SDK Manager. Check back periodically - for news about the changes. -

-

- Get Support -

-
-
-
-
-
-
- - - -
- - -
- - - - - - -
- - -
- -
- - - - - - - - - - - - - diff --git a/docs/html/preview/index.jd b/docs/html/preview/index.jd index a2d0b18ce9f2..c6c20686bd56 100644 --- a/docs/html/preview/index.jd +++ b/docs/html/preview/index.jd @@ -17,44 +17,36 @@ footer.hide=1

M Developer Preview

- 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!

- + + - Set up the Preview SDK + Preview Program Overview
Review the API changes
+ + + Set up the Preview SDK +
Report issues
+
-
-
- -
-

Latest

-
-
- -
-

Resources

-
- Check out these resources to help you get started with the M Developer Preview. +
+
+
-
-
- - +
\ 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 deb16aa8b136..000000000000 --- a/docs/html/preview/license.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - - - - - -License Agreement | Android Developers - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - -
-
- - Android Developers home page - -
-
- -
-
- -
- -
- -

L Developer Preview License Agreement

- -
-

-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. -

- -

-This is the Android SDK Preview License Agreement (the “License Agreement”). -

- -
-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. - - -
-
-
- -
-
- -
- - - - - - -
- - -
- -
- - - diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd index 4f6b7a1e8e31..34c04cfa058a 100644 --- a/docs/html/sdk/index.jd +++ b/docs/html/sdk/index.jd @@ -55,7 +55,6 @@ sdk.win_installer_checksum=e764ea93aa72766737f9be3b9fb3e42d879ab599