diff options
author | Nagesh Susarla <nageshs@google.com> | 2014-09-18 16:40:29 -0700 |
---|---|---|
committer | Nagesh Susarla <nageshs@google.com> | 2014-10-22 16:30:29 -0700 |
commit | cb0b5ab8affad7af3fccb68a13197a7b0e3993b1 (patch) | |
tree | 48f783afd962539bb1425351fdbfd5432bba4b9b /AutoMessagingDemo/README.txt | |
parent | 7c700e80b902c8f7778ffd63c287ac5710fd69ef (diff) | |
download | demos-cb0b5ab8affad7af3fccb68a13197a7b0e3993b1.tar.gz |
Auto Messaging API Sample First draft
Create a simple application that lets developers send a few variations
of notifications such as
1. A conversation with single message
2. Multiple conversations with either single or multiple messages.
The Notifications are extended with the CarExtender class and thus can
be seen either on the emulator or GearHead dash
3. Add README.txt
4. Update the sample to use the latest android-auto-sdk.jar
5. refactor code to only expose the features in the sdk (no multiple partipants)
Bug: 17582488
Change-Id: Ic5d385361dca5e74c8b5e96dbc11fe11cdb421f7
Diffstat (limited to 'AutoMessagingDemo/README.txt')
-rw-r--r-- | AutoMessagingDemo/README.txt | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/AutoMessagingDemo/README.txt b/AutoMessagingDemo/README.txt new file mode 100644 index 0000000..cfd4e6a --- /dev/null +++ b/AutoMessagingDemo/README.txt @@ -0,0 +1,39 @@ +Android Auto Messaging API Sample +================================= + +MessagingService.java shows a simple service that sends notifications using NotificationCompat. +In addition to sending a notification, it also extends the notification with a CarExtender. +Each unread conversation from a user is sent as a distinct notification. + +CheckList while building a messaging app that supports Android Auto: +------------------------------------------------------------------- +1. Add or import the android-auto-sdk.jar into your app. +2. Ensure that Message notifications are extended using +NotificationCompat.Builder.extend(new CarExtender()...) +3. Add meta-data to your AndroidManifest.xml to specify that your app +is automotive enabled. + + <meta-data android:name="com.google.android.gms.car.application" + android:resource="@xml/automotive_app_desc"/> + +and include the following to indicate that the application wants to show notifications on +the overview screen. +res/xml/automotive_app_desc.xml + +<automotiveApp> + <uses name="notification"/> +</automotiveApp> + +Flow +----- +MessagingFragment is shown to the user. Depending on the button clicked, the MessagingService is +sent a message. MessagingService inturn creates notifications which can be viewed either on the +emulator or in a car. +When a message is read, the associated PendingIntent is called 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. + +Known Issues: +------------- +- Emulator: Reply always sends text "This is a reply". No voice input in emulator. |