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