blob: 434b36595c515b002f287169814532833b02912b [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
Copyright 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
<!-- Include additional dependencies here.-->
<!-- dependency></dependency -->
Sample demonstrates best practices for Notification Styles that support Android
phone/tablets and Wear. The phone app demonstrates best practices if you
do not have a dedicated Wear app for Notifications. While the Wear app
demonstrates best practices for a standalone Wear Notification experience without
the Notifications showing on the phone/tablet.
<template src="base" />
<template src="WearPlusShared" />
<!-- See http://go/sample-categories for details on the next 4 fields. -->
<!-- Most samples just need to udpate the Categories field. This is a comma-
seperated list of topic tags. Unlike the old category system, samples
may have multiple categories, so feel free to add extras. Try to avoid
simply tagging everything with "UI". :)-->
<categories>Notification, Wearable</categories>
<!-- Beginner is for "getting started" type content, or essential content.
(e.g. "Hello World", activities, intents)
Intermediate is for content that covers material a beginner doesn't need
to know, but that a skilled developer is expected to know.
(e.g. services, basic styles and theming, sync adapters)
Advanced is for highly technical content geared towards experienced developers.
(e.g. performance optimizations, custom views, bluetooth)
Expert is reserved for highly technical or specialized content, and should
be used sparingly. (e.g. VPN clients, SELinux, custom instrumentation runners) -->
<!-- Dimensions: 512x512, PNG fomrat -->
<!-- Path to screenshots. Use <img> tags for each. -->
<!-- List of APIs that this sample should be cross-referenced under. Use <android>
for fully-qualified Framework class names ("android:" namespace).
Use <ext> for custom namespaces, if needed. See "Samples Index API" documentation
for more details. -->
<!-- 1-3 line description of the sample here.
Avoid simply rearranging the sample's title. What does this sample actually
accomplish, and how does it do it? -->
Sample demonstrates best practices for using NotificationStyle Notifications (Inbox,
BigPicture, BigText, and Messaging) for both Mobile apps and native/local Wear
apps. It also covers Notifications on Wear 1.+ and Wear 2.0.
<!-- Multi-paragraph introduction to sample, from an educational point-of-view.
Makrdown formatting allowed. This will be used to generate a mini-article for the
sample on DAC. -->
Steps for trying out the sample:
* Compile and install the mobile app onto your mobile device or emulator (for mobile
* Compile and install the wearable app onto your Wear device or emulator (for Wear
This sample demonstrate best practices for using [NotificationStyle][1]
[Notifications][2] for two scenarios:
1. Launching Notifications from a Mobile app WITHOUT a native Wear app.
Notifications appear both on mobile and Wear (bridged to appear like a local/native
Wear app).
2. Launching Notifications from a Native/Local Wear app. Notifications only
appear on Wear device.
The Mobile and Wear apps demonstrate [BigTextStyle][3], [BigPictureStyle][4],
[InboxStyle][5], and [MessagingStyle][6] Notifications.
Although there are two apps (Mobile and Wear) running, each should be looked at as a
separate experience. That is, neither app uses nor relies on the other.
They are packaged together simply to show both scenarios in one easy sample.
Both apps also cover the Notifications being displayed on Wear 1.+ and/or Wear 2.0 and
using some of the new features of Wear 2.0 (inline actions).