Home | History | Annotate | Download | only in WearNotifications
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3  Copyright 2013 The Android Open Source Project
      4 
      5  Licensed under the Apache License, Version 2.0 (the "License");
      6  you may not use this file except in compliance with the License.
      7  You may obtain a copy of the License at
      8 
      9      http://www.apache.org/licenses/LICENSE-2.0
     10 
     11  Unless required by applicable law or agreed to in writing, software
     12  distributed under the License is distributed on an "AS IS" BASIS,
     13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  See the License for the specific language governing permissions and
     15  limitations under the License.
     16 -->
     17 <sample>
     18     <name>WearNotifications</name>
     19     <group>Wearable</group>
     20     <package>com.example.android.wearable.wear.wearnotifications</package>
     21 
     22     <minSdk>18</minSdk>
     23     <targetSdkVersion>25</targetSdkVersion>
     24     <targetSdkVersionWear>25</targetSdkVersionWear>
     25 
     26     <wearable>
     27         <has_handheld_app>true</has_handheld_app>
     28     </wearable>
     29 
     30     <dependency>com.android.support:appcompat-v7:25.3.1</dependency>
     31     <dependency>com.android.support:cardview-v7:25.3.1</dependency>
     32     <dependency>com.android.support:design:25.3.1</dependency>
     33 
     34     <dependency_wearable>com.android.support:appcompat-v7:25.3.1</dependency_wearable>
     35     <dependency_wearable>com.android.support:design:25.3.1</dependency_wearable>
     36 
     37     <!-- Include additional dependencies here.-->
     38     <!-- dependency>com.google.android.gms:play-services:5.0.+</dependency -->
     39 
     40     <strings>
     41         <intro>
     42             <![CDATA[
     43             Sample demonstrates best practices for Notification Styles that support Android
     44             phone/tablets and Android Wear. The phone app demonstrates best practices if you do not
     45             have a dedicated Android Wear app for Notifications. While the Android Wear app
     46             demonstrates best practices for a standalone Wear Notification experience without
     47             the Notifications showing on the phone/tablet.
     48             ]]>
     49         </intro>
     50     </strings>
     51 
     52     <template src="base" />
     53     <template src="Wear" />
     54 
     55     <metadata>
     56         <!-- Values: {DRAFT | PUBLISHED | INTERNAL | DEPRECATED | SUPERCEDED} -->
     57         <status>PUBLISHED</status>
     58         <!-- See http://go/sample-categories for details on the next 4 fields. -->
     59         <!-- Most samples just need to udpate the Categories field. This is a comma-
     60              seperated list of topic tags. Unlike the old category system, samples
     61              may have multiple categories, so feel free to add extras. Try to avoid
     62              simply tagging everything with "UI". :)-->
     63         <categories>Notification, Wearable</categories>
     64         <technologies>Android</technologies>
     65         <languages>Java</languages>
     66         <solutions>Mobile</solutions>
     67         <!-- Values: {BEGINNER | INTERMEDIATE | ADVANCED | EXPERT} -->
     68         <!-- Beginner is for "getting started" type content, or essential content.
     69              (e.g. "Hello World", activities, intents)
     70 
     71              Intermediate is for content that covers material a beginner doesn't need
     72              to know, but that a skilled developer is expected to know.
     73              (e.g. services, basic styles and theming, sync adapters)
     74 
     75              Advanced is for highly technical content geared towards experienced developers.
     76              (e.g. performance optimizations, custom views, bluetooth)
     77 
     78              Expert is reserved for highly technical or specialized content, and should
     79              be used sparingly. (e.g. VPN clients, SELinux, custom instrumentation runners) -->
     80         <level>INTERMEDIATE</level>
     81         <!-- Dimensions: 512x512, PNG fomrat -->
     82         <icon>screenshots/icon-web.png</icon>
     83         <!-- Path to screenshots. Use <img> tags for each. -->
     84         <screenshots>
     85             <img>screenshots/mobile-1.png</img>
     86             <img>screenshots/mobile-2.png</img>
     87             <img>screenshots/wear-1.png</img>
     88             <img>screenshots/wear-2.png</img>
     89         </screenshots>
     90         <!-- List of APIs that this sample should be cross-referenced under. Use <android>
     91         for fully-qualified Framework class names ("android:" namespace).
     92 
     93         Use <ext> for custom namespaces, if needed. See "Samples Index API" documentation
     94         for more details. -->
     95         <api_refs>
     96             <android>android.app.Notification</android>
     97             <android>android.support.v4.app.NotificationCompat.BigPictureStyle</android>
     98             <android>android.support.v4.app.NotificationCompat.BigTextStyle</android>
     99             <android>android.support.v4.app.NotificationCompat.InboxStyle</android>
    100             <android>android.support.v4.app.NotificationCompat.MessagingStyle</android>
    101             <android>android.support.v4.app.NotificationManagerCompat</android>
    102             <android>android.support.v4.app.RemoteInput</android>
    103             <android>android.support.v4.app.TaskStackBuilder</android>
    104             <android>android.support.v7.app.AppCompatActivity</android>
    105             <android>android.support.v7.app.NotificationCompat</android>
    106         </api_refs>
    107 
    108         <!-- 1-3 line description of the sample here.
    109 
    110             Avoid simply rearranging the sample's title. What does this sample actually
    111             accomplish, and how does it do it? -->
    112         <description>
    113             Sample demonstrates best practices for using NotificationStyle Notifications (Inbox,
    114             BigPicture, BigText, and Messaging) for both Mobile apps and native/local Android Wear
    115             apps. It also covers Notifications on Wear 1.+ and Wear 2.0.
    116         </description>
    117 
    118         <!-- Multi-paragraph introduction to sample, from an educational point-of-view.
    119         Makrdown formatting allowed. This will be used to generate a mini-article for the
    120         sample on DAC. -->
    121         <intro>
    122 <![CDATA[
    123 Steps for trying out the sample:
    124 * Compile and install the mobile app onto your mobile device or emulator (for mobile
    125 scenario).
    126 * Compile and install the wearable app onto your Wear device or emulator (for Wear
    127 scenario).
    128 
    129 This sample demonstrate best practices for using [NotificationStyle][1]
    130 [Notifications][2] for two scenarios:
    131 
    132 1. Launching Notifications from a Mobile app WITHOUT a native Android Wear app.
    133 Notifications appear both on mobile and Wear (bridged to appear like a local/native
    134 Wear app).
    135 
    136 2. Launching Notifications from a Native/Local Android Wear app. Notifications only
    137 appear on Wear device.
    138 
    139 The Mobile and Wear apps demonstrate [BigTextStyle][3], [BigPictureStyle][4],
    140 [InboxStyle][5], and [MessagingStyle][6] Notifications.
    141 
    142 Although there are two apps (Mobile and Wear) running, each should be looked at as a
    143 separate experience. That is, neither app uses nor relies on the other.
    144 
    145 They are packaged together simply to show both scenarios in one easy sample.
    146 
    147 Both apps also cover the Notifications being displayed on Wear 1.+ and/or Wear 2.0 and
    148 using some of the new features of Wear 2.0 (inline actions).
    149 
    150 [1]: https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Style.html
    151 [2]: https://developer.android.com/reference/android/support/v4/app/NotificationCompat.html
    152 [3]: https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigTextStyle.html
    153 [4]: https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigPictureStyle.html
    154 [5]: https://developer.android.com/reference/android/support/v4/app/NotificationCompat.InboxStyle.html
    155 [6]: https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle.html
    156 ]]>
    157         </intro>
    158     </metadata>
    159 </sample>
    160