diff options
author | Benjamin Baxter <benbaxter@google.com> | 2017-03-22 15:14:08 -0700 |
---|---|---|
committer | Benjamin Baxter <benbaxter@google.com> | 2017-03-27 17:53:54 -0700 |
commit | e401fe03fd3cae499c471fb7adbf3d3efd59c170 (patch) | |
tree | 20e467c1d75067ed52974dc4c21a12964adbd23b /wearable/wear/WearMessagingApp | |
parent | a6e4a8a8f9dc3c98443a7d65e367b075f069a2a1 (diff) | |
download | android-e401fe03fd3cae499c471fb7adbf3d3efd59c170.tar.gz |
Adding manifest, drawables, and gradle wrapper
Upping min sdk to 22.
Bug: 34841755
Change-Id: Ia833abc42ac084b64692124d424b00239a6cffd2
Diffstat (limited to 'wearable/wear/WearMessagingApp')
33 files changed, 819 insertions, 1 deletions
diff --git a/wearable/wear/WearMessagingApp/Wearable/build.gradle b/wearable/wear/WearMessagingApp/Wearable/build.gradle new file mode 100644 index 00000000..8ec9eebf --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/build.gradle @@ -0,0 +1,68 @@ + + +apply plugin: 'com.android.application' + +dependencies { + + compile 'com.android.support:appcompat-v7:25.3.0' + compile 'com.android.support:design:25.3.0' + compile 'com.android.support:support-v13:25.3.0' + + compile 'com.google.android.gms:play-services-wearable:10.2.0' + compile 'com.google.android.gms:play-services-auth:10.2.0' + + provided 'com.google.android.wearable:wearable:2.0.0' + compile('com.google.android.support:wearable:2.0.0') + + compile 'com.fasterxml.jackson.core:jackson-databind:2.7.0' + + compile 'com.github.bumptech.glide:glide:3.7.0' + compile 'de.hdodenhof:circleimageview:1.3.0' +} + +// The sample build uses multiple directories to +// keep boilerplate and common code separate from +// the main sample code. +List<String> dirs = [ + 'main', // main sample code; look here for the interesting stuff. + 'common', // components that are reused by multiple samples + 'template'] // boilerplate code that is generated by the sample template process + +android { + compileSdkVersion 25 + + buildToolsVersion "25.0.2" + + defaultConfig { + versionCode 1 + versionName "1.0" + + minSdkVersion 22 + + targetSdkVersion 25 + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } + + sourceSets { + main { + dirs.each { dir -> + java.srcDirs "src/${dir}/java" + res.srcDirs "src/${dir}/res" + } + } + androidTest.setRoot('tests') + androidTest.java.srcDirs = ['tests/src'] + } + + packagingOptions { + exclude 'META-INF/LICENSE.txt' + exclude 'META-INF/NOTICE' + exclude 'META-INF/LICENSE' + } + +} +apply plugin: 'com.google.gms.google-services'
\ No newline at end of file diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/AndroidManifest.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/AndroidManifest.xml new file mode 100644 index 00000000..d625a9da --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/AndroidManifest.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.example.android.wearable.wear.messaging"> + + <uses-feature android:name="android.hardware.type.watch" /> + + <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.permission.READ_CONTACTS" /> + + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:theme="@android:style/Theme.DeviceDefault"> + + <meta-data + android:name="com.google.android.wearable.standalone" + android:value="true" /> + + <!-- + Important Note: When you have a local/native Android Wear app that creates it's own + notifications, you will want to disable the bridge to the phone. + --> + <meta-data + android:name="com.google.android.wearable.notificationBridgeMode" + android:value="NO_BRIDGING" /> + + <activity + android:name=".chatlist.ChatListActivity" + android:label="@string/app_name" + android:theme="@style/SplashTheme"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + + <activity + android:name=".SignInActivity" + android:label="@string/sign_in" + android:theme="@style/BlueTheme" /> + <activity + android:name=".contacts.ContactsListActivity" + android:label="@string/activity_contacts" + android:theme="@style/BlueTheme" /> + <activity + android:name=".chat.ChatActivity" + android:label="@string/activity_chat" + android:theme="@style/BlueTheme" /> + + <receiver android:name=".chat.MockIncomingMessageReceiver" android:exported="false"> + <intent-filter> + <action android:name="com.example.android.wearable.wear.messaging.action.RECEIVE_MESSAGE" /> + </intent-filter> + </receiver> + + <service android:name=".chat.ReplyToMessageIntentService" android:exported="false" /> + + </application> + +</manifest> diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/ic_launcher-web.png b/wearable/wear/WearMessagingApp/Wearable/src/main/ic_launcher-web.png Binary files differnew file mode 100644 index 00000000..1584d00e --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/ic_launcher-web.png diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable-hdpi/ic_launcher.png b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable-hdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..eede709c --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable-hdpi/ic_launcher.png diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable-mdpi/ic_launcher.png b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..04bbb836 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable-mdpi/ic_launcher.png diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable-xhdpi/ic_launcher.png b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable-xhdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..2636f829 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable-xhdpi/ic_launcher.png diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable-xxhdpi/ic_launcher.png b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable-xxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..dfed8b5b --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable-xxhdpi/ic_launcher.png diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/circle_add.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/circle_add.xml new file mode 100644 index 00000000..59ffd542 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/circle_add.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="oval"> + <solid android:color="@color/blue_65"/> +</shape>
\ No newline at end of file diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/divider.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/divider.xml new file mode 100644 index 00000000..8a9d4aed --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/divider.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <size android:height="1dp" /> + <solid android:color="@color/blue_40" /> +</shape>
\ No newline at end of file diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_add_black_24dp.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_add_black_24dp.xml new file mode 100644 index 00000000..3935e116 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_add_black_24dp.xml @@ -0,0 +1,25 @@ +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/> +</vector> diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_check_white_24dp.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_check_white_24dp.xml new file mode 100644 index 00000000..089cab39 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_check_white_24dp.xml @@ -0,0 +1,24 @@ +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/> +</vector> diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_check_white_36dp.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_check_white_36dp.xml new file mode 100644 index 00000000..d3d6c24d --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_check_white_36dp.xml @@ -0,0 +1,24 @@ +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="36dp" + android:height="36dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/> +</vector> diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_close_white_24dp.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_close_white_24dp.xml new file mode 100644 index 00000000..cecd03b9 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_close_white_24dp.xml @@ -0,0 +1,24 @@ +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/> +</vector> diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_close_white_36dp.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_close_white_36dp.xml new file mode 100644 index 00000000..e7c0a8a7 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_close_white_36dp.xml @@ -0,0 +1,24 @@ +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="36dp" + android:height="36dp" + android:viewportHeight="24.0" + android:viewportWidth="24.0"> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" /> +</vector> diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_face_white_24dp.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_face_white_24dp.xml new file mode 100644 index 00000000..d9afc78b --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_face_white_24dp.xml @@ -0,0 +1,24 @@ +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:pathData="M9,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM15,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8 0,-0.29 0.02,-0.58 0.05,-0.86 2.36,-1.05 4.23,-2.98 5.21,-5.37C11.07,8.33 14.05,10 17.42,10c0.78,0 1.53,-0.09 2.25,-0.26 0.21,0.71 0.33,1.47 0.33,2.26 0,4.41 -3.59,8 -8,8z" + android:fillColor="#FFFFFF" /> +</vector> diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_group_white_48dp.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_group_white_48dp.xml new file mode 100644 index 00000000..8c928c2e --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_group_white_48dp.xml @@ -0,0 +1,24 @@ +<!-- + ~ Copyright (c) 2017 Google Inc. + ~ + ~ 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. + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48dp" + android:height="48dp" + android:viewportHeight="24.0" + android:viewportWidth="24.0"> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M16,11c1.66,0 2.99,-1.34 2.99,-3S17.66,5 16,5c-1.66,0 -3,1.34 -3,3s1.34,3 3,3zM8,11c1.66,0 2.99,-1.34 2.99,-3S9.66,5 8,5C6.34,5 5,6.34 5,8s1.34,3 3,3zM8,13c-2.33,0 -7,1.17 -7,3.5L1,19h14v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5zM16,13c-0.29,0 -0.62,0.02 -0.97,0.05 1.16,0.84 1.97,1.97 1.97,3.45L17,19h6v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5z" /> +</vector> diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_keyboard_black_24dp.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_keyboard_black_24dp.xml new file mode 100644 index 00000000..28d092dd --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_keyboard_black_24dp.xml @@ -0,0 +1,24 @@ +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M20,5L4,5c-1.1,0 -1.99,0.9 -1.99,2L2,17c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,7c0,-1.1 -0.9,-2 -2,-2zM11,8h2v2h-2L11,8zM11,11h2v2h-2v-2zM8,8h2v2L8,10L8,8zM8,11h2v2L8,13v-2zM7,13L5,13v-2h2v2zM7,10L5,10L5,8h2v2zM16,17L8,17v-2h8v2zM16,13h-2v-2h2v2zM16,10h-2L14,8h2v2zM19,13h-2v-2h2v2zM19,10h-2L17,8h2v2z"/> +</vector> diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_mic_black_24dp.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_mic_black_24dp.xml new file mode 100644 index 00000000..26c4d3ec --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_mic_black_24dp.xml @@ -0,0 +1,24 @@ +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M12,14c1.66,0 2.99,-1.34 2.99,-3L15,5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v6c0,1.66 1.34,3 3,3zM17.3,11c0,3 -2.54,5.1 -5.3,5.1S6.7,14 6.7,11L5,11c0,3.41 2.72,6.23 6,6.72L11,21h2v-3.28c3.28,-0.48 6,-3.3 6,-6.72h-1.7z"/> +</vector> diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_person_blue_48dp.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_person_blue_48dp.xml new file mode 100644 index 00000000..e21992a5 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_person_blue_48dp.xml @@ -0,0 +1,24 @@ +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48dp" + android:height="48dp" + android:viewportHeight="24.0" + android:viewportWidth="24.0"> + <path + android:fillColor="@color/blue_500" + android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z" /> +</vector> diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_reply_white_18dp.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_reply_white_18dp.xml new file mode 100644 index 00000000..09632e1f --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ic_reply_white_18dp.xml @@ -0,0 +1,24 @@ +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M10,9V5l-7,7 7,7v-4.1c5,0 8.5,1.6 11,5.1 -1,-5 -4,-10 -11,-11z"/> +</vector> diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ripple_rect_40.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ripple_rect_40.xml new file mode 100644 index 00000000..0bcd78d3 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ripple_rect_40.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> + +<ripple xmlns:android="http://schemas.android.com/apk/res/android" + android:color="@color/accent_dark"> + <item android:drawable="@color/blue_40" /> +</ripple>
\ No newline at end of file diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ripple_select.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ripple_select.xml new file mode 100644 index 00000000..d1015fce --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/ripple_select.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> + +<ripple xmlns:android="http://schemas.android.com/apk/res/android" + android:color="@color/blue_dark_bg"> + <item> + <selector> + <item android:state_selected="false"> + <shape android:shape="rectangle"> + <solid android:color="@color/blue_30" /> + </shape> + </item> + <item android:state_selected="true"> + <shape android:shape="rectangle"> + <solid android:color="@color/blue_65" /> + </shape> + </item> + </selector> + </item> +</ripple> + diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/splash.xml b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/splash.xml new file mode 100644 index 00000000..b527af46 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/drawable/splash.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright 2017 Google Inc. + ~ + ~ 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. + --> + +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@color/blue_55" /> + <item> + <bitmap + android:gravity="center" + android:antialias="true" + android:src="@drawable/ic_launcher" /> + </item> +</layer-list>
\ No newline at end of file diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-hdpi/ic_launcher.png b/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-hdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..eede709c --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-mdpi/ic_launcher.png b/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..04bbb836 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-xhdpi/ic_launcher.png b/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-xhdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..2636f829 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-xxhdpi/ic_launcher.png b/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-xxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..1f575477 --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-xxxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 00000000..dfed8b5b --- /dev/null +++ b/wearable/wear/WearMessagingApp/Wearable/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/wearable/wear/WearMessagingApp/build.gradle b/wearable/wear/WearMessagingApp/build.gradle new file mode 100644 index 00000000..0f377dce --- /dev/null +++ b/wearable/wear/WearMessagingApp/build.gradle @@ -0,0 +1,30 @@ + + +// BEGIN_EXCLUDE +import com.example.android.samples.build.SampleGenPlugin +apply plugin: SampleGenPlugin + +samplegen { + pathToBuild "../../../../../build" + pathToSamplesCommon "../../../common" +} +apply from: "../../../../../build/build.gradle" +// END_EXCLUDE + + +buildscript { + repositories { + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:2.3.0' + classpath 'com.google.gms:google-services:3.0.0' + } +} + +allprojects { + repositories { + jcenter() + } +}
\ No newline at end of file diff --git a/wearable/wear/WearMessagingApp/gradlew b/wearable/wear/WearMessagingApp/gradlew new file mode 100755 index 00000000..91a7e269 --- /dev/null +++ b/wearable/wear/WearMessagingApp/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/wearable/wear/WearMessagingApp/gradlew.bat b/wearable/wear/WearMessagingApp/gradlew.bat new file mode 100644 index 00000000..aec99730 --- /dev/null +++ b/wearable/wear/WearMessagingApp/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/wearable/wear/WearMessagingApp/settings.gradle b/wearable/wear/WearMessagingApp/settings.gradle new file mode 100644 index 00000000..9c2651c7 --- /dev/null +++ b/wearable/wear/WearMessagingApp/settings.gradle @@ -0,0 +1,2 @@ + +include ':Wearable' diff --git a/wearable/wear/WearMessagingApp/template-params.xml b/wearable/wear/WearMessagingApp/template-params.xml index ca962fff..2f65e23e 100644 --- a/wearable/wear/WearMessagingApp/template-params.xml +++ b/wearable/wear/WearMessagingApp/template-params.xml @@ -20,7 +20,7 @@ and replaced with the "categories" tags below. --> <package>com.example.android.wearable.wear.messaging</package> - <minSdk>21</minSdk> + <minSdk>22</minSdk> <targetSdkVersion>25</targetSdkVersion> <targetSdkVersionWear>25</targetSdkVersionWear> |