aboutsummaryrefslogtreecommitdiff
path: root/notification/MessagingService/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'notification/MessagingService/README.md')
-rw-r--r--notification/MessagingService/README.md34
1 files changed, 21 insertions, 13 deletions
diff --git a/notification/MessagingService/README.md b/notification/MessagingService/README.md
index 69e3aa33..c4221550 100644
--- a/notification/MessagingService/README.md
+++ b/notification/MessagingService/README.md
@@ -1,13 +1,16 @@
+
Android MessagingService Sample
-==============================
+===================================
This sample shows a simple service that sends notifications using
NotificationCompat. In addition to sending a notification, it also extends
the notification with a CarExtender to make it compatible with Android Auto.
Each unread conversation from a user is sent as a distinct notification.
-Checklist while building a messaging app that supports Android Auto:
--------------------------------------------------------------------
+Introduction
+------------
+
+#### Checklist while building a messaging app that supports Android Auto:
1. Ensure that Message notifications are extended using
NotificationCompat.Builder.extend(new CarExtender()...)
2. Declare a meta-data tag to your AndroidManifest.xml to specify that your app
@@ -23,30 +26,35 @@ example: AndroidManifest.xml
Include the following to indicate that the application wants to show notifications on
the Android Auto overview screen.
-res/xml/automotive\_app\_desc.xml
+example: res/xml/automotive\_app\_desc.xml
```
-<automotiveApp>
- <uses name="notification"/>
-</automotiveApp>
+ <automotiveApp>
+ <uses name="notification"/>
+ </automotiveApp>
```
-Flow
------
+#### Flow
MessagingFragment is shown to the user. Depending on the button clicked, the MessagingService is
sent a message. MessagingService in turn creates notifications which can be viewed either on the
device or in the messaging-simulator.
-When a message is read, the associated PendingIntent is called and MessageReadReceiver is called
+
+When a message is read, the associated PendingIntent is triggered and MessageReadReceiver is called
with the appropriate conversationId. Similarly, when a reply is received, the MessageReplyReceiver
is called with the appropriate conversationId. MessageLogger logs each event and shows them in a
TextView in MessagingFragment for correlation.
-
Pre-requisites
--------------
-- Android SDK v21
+- Android SDK v23
+- Android Build Tools v22.0.1
- Android Support Repository
+Screenshots
+-------------
+
+<img src="screenshots/1-main.png" height="400" alt="Screenshot"/> <img src="screenshots/2-onemessage.png" height="400" alt="Screenshot"/> <img src="screenshots/3-threemessages.png" height="400" alt="Screenshot"/>
+
Getting Started
---------------
@@ -77,7 +85,7 @@ file to you 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
+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