summaryrefslogtreecommitdiff
path: root/AutoMessagingDemo/app/src/main/res
diff options
context:
space:
mode:
authorNagesh Susarla <nageshs@google.com>2014-09-18 16:40:29 -0700
committerNagesh Susarla <nageshs@google.com>2014-10-22 16:30:29 -0700
commitcb0b5ab8affad7af3fccb68a13197a7b0e3993b1 (patch)
tree48f783afd962539bb1425351fdbfd5432bba4b9b /AutoMessagingDemo/app/src/main/res
parent7c700e80b902c8f7778ffd63c287ac5710fd69ef (diff)
downloaddemos-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/app/src/main/res')
-rw-r--r--AutoMessagingDemo/app/src/main/res/drawable-hdpi/ic_launcher.pngbin0 -> 3964 bytes
-rw-r--r--AutoMessagingDemo/app/src/main/res/drawable-hdpi/notification_icon.pngbin0 -> 937 bytes
-rw-r--r--AutoMessagingDemo/app/src/main/res/drawable-mdpi/ic_launcher.pngbin0 -> 2327 bytes
-rw-r--r--AutoMessagingDemo/app/src/main/res/drawable-mdpi/notification_icon.pngbin0 -> 609 bytes
-rw-r--r--AutoMessagingDemo/app/src/main/res/drawable-xhdpi/ic_launcher.pngbin0 -> 5488 bytes
-rw-r--r--AutoMessagingDemo/app/src/main/res/drawable-xhdpi/notification_icon.pngbin0 -> 1233 bytes
-rw-r--r--AutoMessagingDemo/app/src/main/res/drawable-xxhdpi/android_contact.pngbin0 -> 37477 bytes
-rw-r--r--AutoMessagingDemo/app/src/main/res/drawable-xxhdpi/ic_launcher.pngbin0 -> 9578 bytes
-rw-r--r--AutoMessagingDemo/app/src/main/res/drawable-xxhdpi/notification_icon.pngbin0 -> 1973 bytes
-rw-r--r--AutoMessagingDemo/app/src/main/res/layout-land/fragment_message_me.xml67
-rw-r--r--AutoMessagingDemo/app/src/main/res/layout/activity_main.xml22
-rw-r--r--AutoMessagingDemo/app/src/main/res/layout/fragment_message_me.xml58
-rw-r--r--AutoMessagingDemo/app/src/main/res/values-v21/styles.xml22
-rw-r--r--AutoMessagingDemo/app/src/main/res/values/colors.xml20
-rw-r--r--AutoMessagingDemo/app/src/main/res/values/dimens.xml21
-rw-r--r--AutoMessagingDemo/app/src/main/res/values/strings.xml26
-rw-r--r--AutoMessagingDemo/app/src/main/res/values/styles.xml20
-rw-r--r--AutoMessagingDemo/app/src/main/res/xml/automotive_app_desc.xml19
18 files changed, 275 insertions, 0 deletions
diff --git a/AutoMessagingDemo/app/src/main/res/drawable-hdpi/ic_launcher.png b/AutoMessagingDemo/app/src/main/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..06d85f1
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/AutoMessagingDemo/app/src/main/res/drawable-hdpi/notification_icon.png b/AutoMessagingDemo/app/src/main/res/drawable-hdpi/notification_icon.png
new file mode 100644
index 0000000..9cdfca1
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/drawable-hdpi/notification_icon.png
Binary files differ
diff --git a/AutoMessagingDemo/app/src/main/res/drawable-mdpi/ic_launcher.png b/AutoMessagingDemo/app/src/main/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..4e1cc86
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/AutoMessagingDemo/app/src/main/res/drawable-mdpi/notification_icon.png b/AutoMessagingDemo/app/src/main/res/drawable-mdpi/notification_icon.png
new file mode 100644
index 0000000..d6069eb
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/drawable-mdpi/notification_icon.png
Binary files differ
diff --git a/AutoMessagingDemo/app/src/main/res/drawable-xhdpi/ic_launcher.png b/AutoMessagingDemo/app/src/main/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..92f1e2d
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/AutoMessagingDemo/app/src/main/res/drawable-xhdpi/notification_icon.png b/AutoMessagingDemo/app/src/main/res/drawable-xhdpi/notification_icon.png
new file mode 100644
index 0000000..786ed17
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/drawable-xhdpi/notification_icon.png
Binary files differ
diff --git a/AutoMessagingDemo/app/src/main/res/drawable-xxhdpi/android_contact.png b/AutoMessagingDemo/app/src/main/res/drawable-xxhdpi/android_contact.png
new file mode 100644
index 0000000..611d565
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/drawable-xxhdpi/android_contact.png
Binary files differ
diff --git a/AutoMessagingDemo/app/src/main/res/drawable-xxhdpi/ic_launcher.png b/AutoMessagingDemo/app/src/main/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..2476cbd
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/AutoMessagingDemo/app/src/main/res/drawable-xxhdpi/notification_icon.png b/AutoMessagingDemo/app/src/main/res/drawable-xxhdpi/notification_icon.png
new file mode 100644
index 0000000..005207c
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/drawable-xxhdpi/notification_icon.png
Binary files differ
diff --git a/AutoMessagingDemo/app/src/main/res/layout-land/fragment_message_me.xml b/AutoMessagingDemo/app/src/main/res/layout-land/fragment_message_me.xml
new file mode 100644
index 0000000..8f7b60a
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/layout-land/fragment_message_me.xml
@@ -0,0 +1,67 @@
+<!--
+ Copyright (C) 2014 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.
+ -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center_horizontal"
+ android:orientation="horizontal"
+ android:paddingBottom="@dimen/activity_vertical_margin"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="@dimen/activity_vertical_margin">
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical">
+ <Button
+ android:id="@+id/send_1_conversation"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/send_1_conversation"/>
+
+ <Button
+ android:id="@+id/send_2_conversations"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/send_2_conversations"/>
+
+ <Button
+ android:id="@+id/send_1_conversation_3_messages"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/send_1_conv_3_messages"/>
+ </LinearLayout>
+ <RelativeLayout
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="2">
+ <Button
+ android:id="@+id/clear"
+ android:layout_alignParentBottom="true"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/clear_log"/>
+
+ <TextView
+ android:id="@+id/data_port"
+ android:layout_above="@id/clear"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:maxLines="20"
+ android:scrollbars="vertical"/>
+ </RelativeLayout>
+</LinearLayout>
diff --git a/AutoMessagingDemo/app/src/main/res/layout/activity_main.xml b/AutoMessagingDemo/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..79f6adf
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,22 @@
+<!--
+ Copyright (C) 2014 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.
+ -->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".MessageMeActivity"
+ tools:ignore="MergeRootFrame" />
diff --git a/AutoMessagingDemo/app/src/main/res/layout/fragment_message_me.xml b/AutoMessagingDemo/app/src/main/res/layout/fragment_message_me.xml
new file mode 100644
index 0000000..e673f0d
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/layout/fragment_message_me.xml
@@ -0,0 +1,58 @@
+<!--
+ Copyright (C) 2014 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.
+ -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:gravity="center_horizontal"
+ android:paddingBottom="@dimen/activity_vertical_margin"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
+ android:paddingRight="@dimen/activity_horizontal_margin"
+ android:paddingTop="@dimen/activity_vertical_margin">
+
+ <Button
+ android:id="@+id/send_1_conversation"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/send_1_conversation"/>
+
+ <Button
+ android:id="@+id/send_2_conversations"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/send_2_conversations"/>
+
+ <Button
+ android:id="@+id/send_1_conversation_3_messages"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/send_1_conv_3_messages"/>
+
+ <TextView
+ android:id="@+id/data_port"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:maxLines="20"
+ android:scrollbars="vertical"/>
+ <Button
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/clear"
+ android:text="@string/clear_log"/>
+
+</LinearLayout>
diff --git a/AutoMessagingDemo/app/src/main/res/values-v21/styles.xml b/AutoMessagingDemo/app/src/main/res/values-v21/styles.xml
new file mode 100644
index 0000000..f30c97a
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/values-v21/styles.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+<resources>
+ <style name="AppTheme" parent="android:Theme.Material.Light">
+ <item name="android:colorPrimary">@color/default_color_light</item>
+ <item name="android:colorPrimaryDark">@color/default_color_dark</item>
+ </style>
+</resources>
diff --git a/AutoMessagingDemo/app/src/main/res/values/colors.xml b/AutoMessagingDemo/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..0e6825b
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/values/colors.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+<resources>
+ <color name="default_color_light">#ff4092c3</color>
+ <color name="default_color_dark">#ff241c99</color>
+</resources>
diff --git a/AutoMessagingDemo/app/src/main/res/values/dimens.xml b/AutoMessagingDemo/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..574a35d
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/values/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+<resources>
+ <!-- Default screen margins, per the Android Design guidelines. -->
+ <dimen name="activity_horizontal_margin">16dp</dimen>
+ <dimen name="activity_vertical_margin">16dp</dimen>
+</resources>
diff --git a/AutoMessagingDemo/app/src/main/res/values/strings.xml b/AutoMessagingDemo/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..001b10e
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/values/strings.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+<resources>
+ <string name="app_name">Messaging Sample</string>
+ <string name="action_settings">Settings</string>
+ <string name="title">Messaging Sample</string>
+ <string name="notification_reply">Reply by Voice</string>
+ <string name="send_2_conversations">Send 2 conversations with 1 message</string>
+ <string name="send_1_conversation">Send 1 conversation with 1 message</string>
+ <string name="send_1_conv_3_messages">Send 1 conversation with 3 messages</string>
+ <string name="clear_log">Clear Log</string>
+</resources>
diff --git a/AutoMessagingDemo/app/src/main/res/values/styles.xml b/AutoMessagingDemo/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..3f1a6af
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/values/styles.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+<resources>
+ <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+ </style>
+</resources>
diff --git a/AutoMessagingDemo/app/src/main/res/xml/automotive_app_desc.xml b/AutoMessagingDemo/app/src/main/res/xml/automotive_app_desc.xml
new file mode 100644
index 0000000..9e9f174
--- /dev/null
+++ b/AutoMessagingDemo/app/src/main/res/xml/automotive_app_desc.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2014 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.
+ -->
+<automotiveApp>
+ <uses name="notification"/>
+</automotiveApp>