1 2 Android WearMessagingApp Sample 3 =================================== 4 5 Sample demonstrating how to build a messaging app with the following features: contacts list, 6 chat list, send messages, message style notification, and sign-in with Google. 7 8 Introduction 9 ------------ 10 11 Getting Started 12 --------------- 13 14 This project demonstrates Google Sign-in. You will need to follow the setup instructions for 15 integrating Google Sign-in into an Android app at the link below. Remember to use the package name 16 com.example.android.wearable.wear.messaging when configuring your project and credentials, or 17 otherwise modify the sample appropriately if you want to use a different package name. 18 19 https://developers.google.com/identity/sign-in/android/start-integrating 20 21 After you finish setting up the ___google-services.json___ file for Google Sign-in, update the 22 ___strings.xml___ file for the string value ___default\_web\_client\_id___ to the value for the 23 OAuth web client id created. 24 25 Features 26 --------------- 27 The project demonstrates the following features: 28 29 - Chat list 30 - Contacts list 31 - Authentication with Google 32 - Sending a chat message 33 - Receiving a chat message 34 - Replying from a notification 35 36 Each feature is contained in it's own package: 37 38 - _com.example.android.wearable.wear.messaging.____chat___ 39 - Displays a conversation 40 - Handles incoming messages from a mocked back end server. 41 - Replies to messages from a notification 42 - _com.example.android.wearable.wear.messaging.____chatlist___ 43 - Displays all of the conversations you are involved in. 44 - _com.example.android.wearable.wear.messaging.____contacts___ 45 - Displays a list your contacts. In this sample, the contacts are mocked out. You will want to 46 replace the backing datasource with your own contacts solution. 47 - _com.example.android.wearable.wear.messaging.____mock___ 48 - A local mock database. 49 - _com.example.android.wearable.wear.messaging.____model___ 50 - Objects that are displayed in the UI. These objects also act as entities and are persisted in 51 the mock database. 52 53 54 To see other examples of Google Sign-in, check out the [Android Wear Google Sign-In Sample][1]. 55 56 To see other examples of notifications, check out the [Android WearNotifications Sample][2] 57 58 [1]: https://github.com/googlesamples/android-WearStandaloneGoogleSignIn 59 [2]: https://github.com/googlesamples/android-WearNotifications 60 61 Pre-requisites 62 -------------- 63 64 - Android SDK 27 65 - Android Build Tools v27.0.2 66 - Android Support Repository 67 68 Screenshots 69 ------------- 70 71 <img src="screenshots/chat_list.png" height="400" alt="Screenshot"/> <img src="screenshots/chat.png" height="400" alt="Screenshot"/> <img src="screenshots/contacts.png" height="400" alt="Screenshot"/> 72 73 Getting Started 74 --------------- 75 76 This sample uses the Gradle build system. To build this project, use the 77 "gradlew build" command or use "Import Project" in Android Studio. 78 79 Support 80 ------- 81 82 - Google+ Community: https://plus.google.com/communities/105153134372062985968 83 - Stack Overflow: http://stackoverflow.com/questions/tagged/android 84 85 If you've found an error in this sample, please file an issue: 86 https://github.com/googlesamples/android-WearMessagingApp 87 88 Patches are encouraged, and may be submitted by forking this project and 89 submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details. 90 91 License 92 ------- 93 94 Copyright 2017 The Android Open Source Project, Inc. 95 96 Licensed to the Apache Software Foundation (ASF) under one or more contributor 97 license agreements. See the NOTICE file distributed with this work for 98 additional information regarding copyright ownership. The ASF licenses this 99 file to you under the Apache License, Version 2.0 (the "License"); you may not 100 use this file except in compliance with the License. You may obtain a copy of 101 the License at 102 103 http://www.apache.org/licenses/LICENSE-2.0 104 105 Unless required by applicable law or agreed to in writing, software 106 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 107 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 108 License for the specific language governing permissions and limitations under 109 the License. 110