blob: 4cfc428ad29b41b536253f2f651eb2734e79bb96 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2017 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<sample>
<name>WearMessagingApp</name>
<group>Wearable</group> <!-- This field will be deprecated in the future
and replaced with the "categories" tags below. -->
<package>com.example.android.wearable.wear.messaging</package>
<minSdk>24</minSdk>
<targetSdkVersion>25</targetSdkVersion>
<targetSdkVersionWear>25</targetSdkVersionWear>
<dependency_wearable>com.android.support:appcompat-v7:25.3.1</dependency_wearable>
<dependency_wearable>com.android.support:support-v13:25.3.1</dependency_wearable>
<dependency_wearable>com.android.support:design:25.3.1</dependency_wearable>
<dependency_wearable>com.google.android.gms:play-services-wearable:10.2.6</dependency_wearable>
<dependency_wearable>com.google.android.gms:play-services-auth:10.2.6</dependency_wearable>
<dependency_wearable>com.github.bumptech.glide:glide:3.8.0</dependency_wearable>
<dependency_wearable>com.google.code.gson:gson:2.8.0</dependency_wearable>
<strings>
<intro>
<![CDATA[
Sample demonstrates best practices for building a messaging experience on Wear.
]]>
</intro>
</strings>
<template src="base-build" />
<template src="Wear" />
<metadata>
<!-- Values: {DRAFT | PUBLISHED | INTERNAL | DEPRECATED | SUPERCEDED} -->
<status>PUBLISHED</status>
<!-- 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>Wearable</categories>
<technologies>Android</technologies>
<languages>Java</languages>
<solutions>Mobile</solutions>
<!-- Values: {BEGINNER | INTERMEDIATE | ADVANCED | EXPERT} -->
<!-- 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) -->
<level>INTERMEDIATE</level>
<!-- Dimensions: 512x512, PNG fomrat -->
<icon>screenshots/icon-web.png</icon>
<!-- Path to screenshots. Use <img> tags for each. -->
<screenshots>
<img>screenshots/chat_list.png</img>
<img>screenshots/chat.png</img>
<img>screenshots/contacts.png</img>
</screenshots>
<!-- 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. -->
<api_refs>
<android>com.google.android.gms.auth.api.Auth</android>
<android>com.google.android.gms.auth.api.signin.GoogleSignInAccount</android>
<android>com.google.android.gms.common.api.GoogleApiClient</android>
<android>android.support.wearable.view.WearableRecyclerView</android>
<android>android.support.wearable.view.drawer.WearableActionDrawer</android>
<android>android.support.wearable.view.drawer.WearableDrawerLayout</android>
<android>android.support.v7.util.SortedList</android>
</api_refs>
<!-- 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? -->
<description>
<![CDATA[
Sample demonstrating how to build a messaging app with the following features: contacts list,
chat list, send messages, message style notification, and sign-in with Google.
]]>
</description>
<!-- 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. -->
<intro>
<![CDATA[
Getting Started
---------------
This project demonstrates Google Sign-in. You will need to follow the setup instructions for
integrating Google Sign-in into an Android app at the link below. Remember to use the package name
com.example.android.wearable.wear.messaging when configuring your project and credentials, or
otherwise modify the sample appropriately if you want to use a different package name.
https://developers.google.com/identity/sign-in/android/start-integrating
After you finish setting up the ___google-services.json___ file for Google Sign-in, update the
___strings.xml___ file for the string value ___default\_web\_client\_id___ to the value for the
OAuth web client id created.
Features
---------------
The project demonstrates the following features:
- Chat list
- Contacts list
- Authentication with Google
- Sending a chat message
- Receiving a chat message
- Replying from a notification
Each feature is contained in it's own package:
- _com.example.android.wearable.wear.messaging.____chat___
- Displays a conversation
- Handles incoming messages from a mocked back end server.
- Replies to messages from a notification
- _com.example.android.wearable.wear.messaging.____chatlist___
- Displays all of the conversations you are involved in.
- _com.example.android.wearable.wear.messaging.____contacts___
- Displays a list your contacts. In this sample, the contacts are mocked out. You will want to
replace the backing datasource with your own contacts solution.
- _com.example.android.wearable.wear.messaging.____mock___
- A local mock database.
- _com.example.android.wearable.wear.messaging.____model___
- Objects that are displayed in the UI. These objects also act as entities and are persisted in
the mock database.
To see other examples of Google Sign-in, check out the [Wear Google Sign-In Sample][1].
To see other examples of notifications, check out the [WearNotifications Sample][2]
[1]: https://github.com/googlesamples/android-WearStandaloneGoogleSignIn
[2]: https://github.com/googlesamples/android-WearNotifications
]]>
</intro>
</metadata>
</sample>