字幕组成品列表(Beta)
  • 写在前面
  • Android 平台
    • Game On! 游戏开发系列 - 031
      • Pie Noon - 1503060393
      • The Death of Base Game Activity - 1504030543
      • Surviving OpenGL Context Loss - 1504030546
      • WebP for Game Devs - 1504030547
      • Saved Games In-Depth (Part 1) - 1504070556
      • Saved Games In-Depth (Part 2) - 1504030548
      • Smaller Flipbook Textures with CRABBY - 1504030544
      • Google Tag Manager - 1504030545
      • Flatbuffers - 1505050794
      • Achievement Point Pointers - 1505050796
      • Frequency Scaling - 1505050797
      • Meet the Management APIs - 1501140367
      • Y U Ship Broken Games - 1505050795
    • Android 性能优化 - 088
      • Garbage Collection in Android - 1503170425
      • Performance Cost of Memory Leaks - 1503170424
      • Rendering Performance 101 - 1501130351
      • Understanding Overdraw - 1501130352
      • Understanding VSYNC - 1501130353
      • Tool - Profile GPU Rendering - 1501130354
      • Why 60fps? - 1501130355
      • Android UI and the GPU - 1501130356
      • Invalidations, Layouts, and Performance - 1501130357
      • Overdraw, Cliprect, QuickReject - 1501130358
      • Tool - Memory Monitor - 1501130363
      • Battery Performance 101 - 1501130364
      • Understanding Battery Drain on Android - 1501130365
      • Battery Drain and WakeLocks - 1501130366
      • Memory Performance 101 - 1504170661
    • I/O 2014 Android 开发专题 - 089
      • Activity Transitions - 1504020505
      • Building Apps For Android TV - 1504020520
      • Building great Android media experiences - 1504020510
      • Building a quality app from start to finish - 1504020515
      • App Indexing API - 1504020507
      • What's new in WebView - 1504010484
      • Bluetooth Low Energy - 1504010486
      • Building impressive Android media experiences - 1504010493
      • The next Generation of Authentication - 1504020497
      • Don't Alpha That Pixel! - 1504020523
      • NFC + HCE Your phone in an interactive world - 1504020509
      • Demystifying encodes and decodes of WebM - 1504020521
      • Google Cloud Messaging - 1504020524
      • Getting your Game on the Big Screen - 1504020518
      • I hear you like realtime memes - 1504020511
      • Offerize your App - 1504020506
      • Using the Android Job Scheduler - 1504020504
      • From Holo to Material - 1504020526
      • Under the Hood of Android Auto - 1504020501
      • Isolation for Android App Developers - 1504020498
      • Android Work - 1504010496
      • ExoPlayer: Adaptive video streaming on Android - 1504010489
      • Sample rates and resampling: Why can't we all just agree? - 1504010488
      • Drive Android API - 1504010485
    • Android Studio - 004
      • Layout Editor (Ep 3, Android Studio) - 1503290479
      • Introducing Gradle (Ep 2, Android Studio) - 1503170426
    • I/O 2014 Android 分发主题 - 091
      • Introduction to Google Play - 1504030534
      • Google Play: building your user community - 1504030535
      • Optimizing Apps for Education - 1504030536
      • Succeeding in Education Technology - 1504030530
      • Subscriptions Made Easy with Google Play - 1504030531
      • The world is your playground - go global with Google - 1504030533
      • Maximizing discoverability on Google Play - 1504030538
    • Android Auto - 003
      • Introduction to Android Auto - 1504130615
      • Android Auto Messaging - 1504130617
      • Android Auto Audio - 1504130616
    • Android Wear - 006
      • Designing for Android Wear - 1503210448
      • How We Customized Google Apps for Android Wear - 1503210450
      • Fullscreen apps for Android Wear - 1503210445
      • New Notification Features for Android Wear - 1503210446
      • Building Cloud-powered wearable Apps - 1503210449
      • An Introduction to Android Wear - 1503190435
      • Google I/O 2014 - Android Wear: The developer's perspective - 1503210442
      • Devoxx 2014 Interviews: Android Wear - 1503210440
      • DevBytes: Watch Faces for Android Wear - 1503210439
    • Android TV - 005
      • Using the Leanback library - 1504080588
      • Beach Buggy Racing Multiplayer with Nearby Connections (Play Services) - 1503060387
    • Android for Work - 106
      • Android for Work for Developers - 1503060390
      • App Configurations, Testing and Launchers - 1504110590
    • IO Bytes 2014 - Android - 066
      • Chrome Apps on Android and iOS - 1501080014
      • Perf Primer CPU, GPU and your Android game - 1501080017
  • Chrome 平台
    • IO Bytes 2014 - Chrome and Web - 067
      • Using the PageSpeed API - 1505070815
      • Fabulous Forms for the multi-device web - 1505070816
      • Testing multi-screen web pages - 1505070817
      • Responsive images today - 1505070819
      • Web Performance Testing at YouTube - 1505070828
      • Building sites for the multi-device web - 1505070820
      • Deep dive: Google Cloud Messaging for Chrome - 1505070827
  • Google 创业者资源
    • Coffee with a Googler - 012
      • Chat with Allen Huang of AndroidTV - 1503040384
      • Chat with Fred Chung about developer advocacy - 1503070395
      • Google Fit platform with Michelle Haq - 1503210443
      • Android Auto Product Manager Andrew Brenner - 1501120027
      • Chat with Francis Ma about Google Play services - 1501120028
    • Root Access For Startups - 077
      • What we learned building plug-ins for Android, with startup Magnet - 1503230453
      • How to use crowdfunding to your advantage, with startup Hale Devices - 1503280462
      • How to overcome customer objections when selling tech, with startup Guesswork - 1503280458
    • First Things First - 029
      • Getting started with Android: A crash-course in developing for Android - 1504120601
      • How to ask a question: conducting research for your startup - 1504120603
      • MVP Design Hacks: transform your hot idea into a validated prototype - 1504120602
      • Build something people want: Solving real problems - 1504120605
    • How I - 061
      • Use BigQuery to find my most valuable customers - 1504070573
      • Manage beta testing communities using Google Play - 1504070572
      • Use paper wireframing to build native prototypes - 1504070570
      • Used social media and $0 marketing to get 68 million users - 1504070568
      • Prep to fundraise with four questions - 1504070564
      • Validated my idea in 2 days (with no code) - 1504070562
      • Build open platforms on Android - 1504120596
      • Get cheap, automatic analytics for my business using BigQuery - 1504070571
      • Write press releases to get international media coverage - 1504070569
      • Test beta-product features using Google Apps - 1504070563
      • Use URL builder to measure ROI on social media - 1504070561
      • Use events to build DeadSocial's brand - 1504070557
      • Use BigQuery to visualize streaming data - 1503220452
      • Find, screen, and hire developers - 1503120406
      • Drive engagement with social challenges - 1504070558
  • 设计
    • DesignBytes - 017
      • Paper and Ink: The Materials that Matter - 1505050793
  • 云计算
    • DevBytes: Google Cloud Platform - 021
      • Powering the next killer app with the Google Cloud Platform - 1504210672
      • Introduction to Google Cloud Endpoints - 1504210675
      • The Beauty of Scale with Google Cloud Platform - 1504210678
    • Google Cloud Platform - Big Data - 105
      • GDELT & BigQuery: Understand the world - 1502200379
    • Uncategorized - 999
      • Introducing Google Cloud Platform Resources - 1501190370
  • Google 应用开发
    • Launchpad Online - 072
      • The Setup: Creating new apps using Google APIs - 1503190428
      • Listing your files in Google Drive - 1503190429
      • Customizing Google Analytics for your startup - 1503290473
      • The Launchpad Online series - 1503190427
      • Getting started with Google Analytics - 1503290472
      • Accessing Google Maps from a spreadsheet?!? - 1502220381
      • Change the world in 10 lines of code - 1503080398
    • Google Play Services - 054
      • Google Play services 6.1 - 1503290481
      • Google Play Services 7.0 - 1503200437
      • Google Play Services 6.5 - 1501080015
    • 谷歌地图 iOS SDK - 053
      • Maps Live: New Features in the Google Maps Mobile APIs for Android and iOS - 1504300777
    • Google 移动搜索开发 - 055
      • Is your app in the Google index? - 1504120598
      • Get more engaged users with Google Search for Developers - 1503070397
    • DevBytes: Google Cast - 020
      • Google Cast SDK for Android - 1504180666
      • Media Router Framework - Part 1 - Media Router API - 1504180667
      • Overview for Google Cast Receivers - 1504180664
      • Google Cast SDK for iOS - 1504180663
    • Getting Started with the Google Maps SDK for iOS - 035
      • Getting started with the Google Maps SDK for iOS, Part 1 - 1504270757
    • IO Bytes 2014 - Wearables - 070
      • Voice Driven GDK Glassware - 1505280836
    • Route 85 - 078
      • Introducing Route 85 - 1501120022
      • Quick Tip: Don't Default that Switch! - 1501190371
      • OpenInChrome on iOS, Part 1 - 1501120023
      • OpenInChrome on iOS, Part 2 - 1501120024
      • OpenInChrome on iOS, Part 3 - 1501120025
      • OpenInChrome on iOS, Part 4 - 1501120026
    • DevBytes 2014 - 019
      • Web Components - Template - 1505040789
      • Wearable DataLayer API - 1505050792
      • Using srcset for responsive images - 1505050790
      • The picture element for art direction - 1505050791
    • Uncategorized - 999
      • Sun Surveyor brings augmented reality to photographers using Google Maps APIs - 1504200668
      • Snappy travels with the Roads API - 1503060392
      • Easy Maps Apps in Java and Python - 1501140030
  • Google 广告平台
  • Polymer
    • Polycasts - 076
      • The Awesome Power of Auto-Binding Templates -- Polycasts #08 - 1502220382
      • Content Switcheroo with Core-Pages -- Polycasts #09 - 1502200380
      • Core Iconset -- Polycasts #02 - 1505040788
  • Web 平台
    • HTTP 203 - 062
      • Gotchas - 1501140368
      • Font Rendering - 1501080016
    • Web Components - 081
      • DevBytes: Web Components - Overview - 1504250709
  • 宣传视频
    • Uncategorized - 999
      • Google Developers - 1501150369
      • I/O Extended 2014 - Join me - 1502220383
  • Google 各类开发者会议
    • 2014 Chrome 开发者高峰会议 - 009
      • Keynote - Chrome Dev Summit 2014 (Darin Fisher) - 1503120407
      • TLS All the Things! - Security with Performance(Chris Palmer) - 1503140412
      • Let’s build some apps with Polymer!(Rob Dodson) - 1503150415
      • Day One Closing Remarks(Sundar Pichai) - 1503150417
      • Chrome Leadership panel - 1503160422
      • Fundamentals of Mobile Web Development(Matt Gaunt) - 1503150416
    • 2015 游戏开发者大会中 - 039
      • FlatBuffers - 1504150640
      • Games for Google Cast - 1504150637
      • Top 10 Things Android Game Developers Should Know v 3.0 - 1504150643
      • Automate Publishing for Google Play APIs - 1504150639
      • 3 Game Design Mistakes You're Making - 1504150636
      • Android TV - 1504150638
      • How to Go Viral Without Really Trying - 1504150641
    • Devoxx 2014 Interviews - 024
      • What's new in Android 5.0 Lollipop - 1504260740
      • Android Tools - 1504260743
      • BigQuery and user-defined functions - 1504260744
    • IO Bytes 2014 - 065
      • Dart in Google Cloud - 1505070810
      • Big genomic data on Google Cloud Platform - 1505070811
      • Easy International Checkout with Chrome - 1505070802
      • Google developer tools and APIs for iOS - 1503190436
      • Whet your appetite with IO Bytes - 1501080021
    • PlayTime@Shanghai - 095
      • 主题演讲 Chris Yerga - 1504060549
      • 如何成功地开发你的应用 Ellie Powers - 1504060550
      • 在Google上营利 Brahim Elbouchikhi - 1504060551
      • Playtime Shanghai event sizzle reel - 1504070552
    • Project Google I/O 2015 - 098
      • Project Tango Mobile 3D tracking and perception - 1506120857
      • Democratizing Education - 1506120868
      • Improve your Android app’s accessibility - 1506120864
      • Google Cloud Messaging 3.0 - 1506120844
      • Developers connecting the world through Google Play - 1506120862
  • 开源开放技术
    • Compressor Head - 013
      • The Trailer, Season 2 - 1503060385
      • Behind the Scenes - 1503210441
      • Arithmetic Compression (Ep 5, Compressor Head) Google - 1503070394
      • Introducing Compressor Head - 1502120372
      • Episode 1 (Variable Length Codes) - 1502120373
      • Episode 2 (The LZ77 Compression Family) - 1502120374
      • Episode 3 (Markov Chain Compression) - 1502120375
Powered by GitBook
On this page
  • 译者信息
  • 解说词中文版:

Was this helpful?

  1. Android 平台
  2. Android Wear - 006

New Notification Features for Android Wear - 1503210446

PreviousFullscreen apps for Android Wear - 1503210445NextBuilding Cloud-powered wearable Apps - 1503210449

Last updated 5 years ago

Was this helpful?

视频发布时间

2014年6月25日

视频介绍

Learn about the new Notification features added for Android Wear, including automatic bridging from phone or tablet, new display templates, notification bundles, remote voice input, and others.

视频推介语

暂无,待补充。

译者信息

翻译

润稿

终审

原始链接

中文字幕

翻译流水号

加入字幕组

虞高

wang7x

程路

1503210446

解说词中文版:

嗨

我是Griff Hazen 穿戴式安卓设备的工程师

我的团队正致力于开发为安卓穿戴式设备创造

丰富通知体验的API(应用程序接口)

让我们来看一下穿戴式设备通知的三个方面

新的显示选项 新的通知行为特性

和高级的用户自定义选项

这是一个通知流

一种获取信息和与用户交互的绝佳方式

垂直通知列表包含不同形状和大小的通知

在表盘上向上滑动以打开一个通知

继续滑动能显示附加的卡片(material design)

通过调用Android通知的API

通知可以被加入通知流中

如果你很熟悉这些API

你可能认出这里的一些特性

举个栗子 可以在通知栏

向右滑来进入

独立屏幕显示的卡片

正如在手机和平板上面

通知也可以被清除

只要按着通知卡片滑向一边然后松手

在手机上的通知会自动地同步到手表上

这让很多现有的Android应用能继续

在穿戴式设备上提供服务

同理 对通知的响应和清除操作也支持同步

我们支持多种现有的通知风格

比如有收件箱 大图模式 长文字模式

当内容过长的时候 用户可以轻点这个通知 来看到具体内容

为了丰富用户体验

我们还加入了新的API来给用户定制

它们是Android SDK和支持库中的

可穿戴设备扩展类中的一部分

让我们来一睹其详

首先我们提供多页面提醒

页面用于展现单个通知的更详细信息

这些页面可以通过滑动来进入

在屏幕的底部会显示指示点

来告诉用户现在处于哪个页面

由于页面也是通知对象

所以它们可以套用各种通知样式

如果要给一个通知添加页面 可以通过调用

新的Wearable Extender Class中的Add Page方法来实现

这些代码片段展示了如何增加两个用于显示内容的页面

组成一个三个卡片的通知

同样的 正如你在之前的动画里看到的一样

你可以添加一个不包含卡片的全屏图片的页面

这个在图像应用中很实用 比如显示地图或者照片

当创建一个只有图像页面的通知时

需要调用setBackground方法来设置一个图片

并且调用setHintShowBackgroundOnly方法来隐藏它的卡片

页面有助于在单个通知里加入细节

另外一个新的特性是通知栈

这个特性允许对多个通知进行分组

用户可以与整个栈交互

或者进入一个单独的条目

用户操作可以对整个栈和它的子通知生效

这个特性对于一些消息类的应用很方便

有可能用户想要对他所有消息进行操作

或者一次只操作其中的一个

我们创建一个通知栈 需要发布一个或者更多的子通知

并且用同样的group key来标记它们

你可以通过调用NotificationCompat.Builder

里的setGroupMethod方法来完成

同一个应用具有相同

group key的通知会集成在同一个栈里

你还可以调用setSortKey方法来整理这些条目

如果你想要为一个子通知集合设定背景图片和用户操作

你可以用一个可选的群组摘要通知

在这种情况下 用户将看到 归档所有通知 这样的群组操作

确保你对每一个通知设置了

独立的ID或tag 否则

在弹出通知的时候会互相覆盖

目前所展示的所有通知方式

都用了默认的模式

即在已有的卡片的

右边加上额外的页面

左图的手表展现了这种方法

滑走主卡片页面可以显示暂停按钮页面

然而 右图中的手表展示了直接在

已有的卡片上显示按钮

这使得整个卡片可以被点击

调用穿戴式设备类库里的setContentAction方法

能够在卡片上设置动作

这些动作将不会作为独立的页面显示

远程输入是一个通知动作的新特性

这一特性允许用户触发远程输入时

收集用户的文本信息

用户需要说出一个词

然后从一组选项中进行选择

输入的结果会与你的操作intent

一起发送

远程输入是手机 平板

穿戴式设备应用进行语音互动的便捷方式

展示出来的代码片段说明了 如何给一个回复操作添加远程输入功能

当用户触发这个行为时

这些代码会在Quick Reply的标签后台

准备好提供语音输入接口

一旦文字从语音被转化出来 并且在经过用户的允许情况下

包含输入结果的操作intent就会被触发

intent接受器可以是

一个activity service或者是广播接收者

可以通过调用远程输入API中的intent功能

来获取文本结果

在这段代码中 变量quickReplyText

会被赋值为用户的输入文本

这里还有许多其他选项

可以在远程输入的API中被调用

包括对预先设定选项的支持

开启或关闭远程输入 自由的输入格式

或者支持对于同一个动作有多个输入

标准的通知模版

可能并不足以用来展现

你想要表达在通知卡片中的内容

所以我们添加了一个新的API set Display Intent

这个特性通过调用一个Android activity

实时展现通知的内容

这个特性只提供给可穿戴设备上的应用

并且这些应用的编译目标API必须是level 20

当要在一个自定义通知卡片中内嵌一个activity

你必须先把它标记为exported

这可以通过设置这个activity中的exported属性来做到

设置这个属性为true 或者添加一个intent过滤器

接下来 把allowEmbedded这个属性设置成true

这个属性用来确保activity

在需要时才被集成

最后 设置taskAffinity属性为空字符串

这些activity和其他的activity类似

不过当activity位于通知流中 触摸输入不会被传递

所以不适合使用按钮

这样的控件

一旦你写完了activity

你可以在通知流中嵌入这个activity 创建一个通知

并且用可穿戴扩展对象的setDisplayIntent方法

来选择这个activity

你可以通过添加页面到display intent来向

activity传递任何必要的数据

我们来看一些自定义显示通知的例子

在通知流中的标准通知

会自动基于内容调整大小

但是当你并不想要用默认大小的时候

你需要为自定义显示通知指定一个大小

你可以通过调用穿戴式设备类库中的set custom size preset方法或者set custom

content height方法来选择一个尺寸

除了自定义显示类通知卡片

在这个视频中介绍的API

都同时适用于可穿戴设备的通知

以及绑定到可穿戴设备的手机或者平板的通知

把手机或者平板和穿戴式设备连接

是自动进行的 但是这里还有一些新的API

来定制这个连接行为

首先 你可以通过调用NotificationCompatBuilder对象

的setLocalOnly方法完全禁用这个链接

这对与其他设备无关的通知

非常有用

第二个特性是可以只推送穿戴式设备上的

通知消息

这能让你为你的手机和穿戴式设备

选择不同的通知方式

只给穿戴式设备通知处理可以通过调用Wearable Extender Class来实现

在本教程中 我们了解了一系列在穿戴式设备上进行消息推送的

新特性

我希望这能够增强现有可穿戴式设备上的Android应用

和消息通知能力

同时给创造新的穿戴式设备体验带来一些启发

更多关于这些API的信息以及设计原则

可以在Android Wear Developer网站上找到

网址是developer.android.com/wear

我是Griff Hazen 感谢您的收看

Youtube
Youtube
加入 GDG 字幕组
video_screenshot