├── CONTRIBUTING ├── LICENSE ├── README.md ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── mobile ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── example │ │ └── android │ │ └── wearable │ │ └── wcldemo │ │ ├── MobileApplication.java │ │ ├── MobileMainActivity.java │ │ └── pages │ │ ├── DataExchangeFragment.java │ │ ├── FileTransferFragment.java │ │ ├── IntroFragment.java │ │ ├── StockFragment.java │ │ └── VoiceFragment.java │ └── res │ ├── drawable-hdpi │ ├── ic_file_download_grey_200_48dp.png │ ├── ic_home_grey_200_48dp.png │ ├── ic_import_export_grey_200_48dp.png │ ├── ic_mic_grey_200_48dp.png │ ├── ic_photo_200dp.png │ ├── ic_trending_up_grey_200_48dp.png │ └── ic_watch_white_48dp.png │ ├── drawable-mdpi │ ├── ic_file_download_grey_200_48dp.png │ ├── ic_home_grey_200_48dp.png │ ├── ic_import_export_grey_200_48dp.png │ ├── ic_mic_grey_200_48dp.png │ ├── ic_photo_200dp.png │ ├── ic_trending_up_grey_200_48dp.png │ └── ic_watch_white_48dp.png │ ├── drawable-xhdpi │ ├── ic_file_download_grey_200_48dp.png │ ├── ic_home_grey_200_48dp.png │ ├── ic_import_export_grey_200_48dp.png │ ├── ic_mic_grey_200_48dp.png │ ├── ic_photo_200dp.png │ ├── ic_trending_up_grey_200_48dp.png │ └── ic_watch_white_48dp.png │ ├── drawable-xxhdpi │ ├── ic_file_download_grey_200_48dp.png │ ├── ic_home_grey_200_48dp.png │ ├── ic_import_export_grey_200_48dp.png │ ├── ic_mic_grey_200_48dp.png │ ├── ic_photo_200dp.png │ ├── ic_trending_up_grey_200_48dp.png │ └── ic_watch_white_48dp.png │ ├── drawable-xxxhdpi │ ├── ic_photo_200dp.png │ └── ic_watch_white_48dp.png │ ├── drawable │ └── side_nav_bar.xml │ ├── layout │ ├── app_bar_mobile_main.xml │ ├── content_mobile_main.xml │ ├── data_exchange.xml │ ├── file_transfer.xml │ ├── intro_fragment.xml │ ├── mobile_main.xml │ ├── nav_header_mobile_main.xml │ ├── stock.xml │ └── voice_fragment.xml │ ├── menu │ └── mobile_main_drawer.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ └── ic_launcher.png │ ├── values-v21 │ └── styles.xml │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ ├── styles.xml │ └── wear.xml ├── settings.gradle ├── shared ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── example │ │ └── android │ │ └── wearable │ │ └── wcldemo │ │ └── common │ │ └── Constants.java │ └── res │ └── values │ └── strings.xml └── wear ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src └── main ├── AndroidManifest.xml ├── assets └── text_file.txt ├── java └── com │ └── example │ └── android │ └── wearable │ └── wcldemo │ ├── MyListActivity.java │ ├── WearApplication.java │ └── pages │ ├── DataExchangeActivity.java │ ├── FileTransferActivity.java │ ├── StockActivity.java │ └── StreamingVoiceActivity.java └── res ├── drawable ├── ic_file_upload_24dp.xml ├── ic_import_export_24dp.xml ├── ic_language_24dp.xml ├── ic_list_24dp.xml ├── ic_mic_24dp.xml ├── ic_person_24dp.xml └── ic_phone_android_24dp.xml ├── layout ├── data_exchange_rect.xml ├── data_exchange_round.xml ├── data_exchangte.xml ├── file_transfer.xml ├── file_transfer_rect.xml ├── file_transfer_round.xml ├── stock.xml └── stream_voice.xml ├── mipmap-hdpi └── ic_launcher.png ├── mipmap-mdpi └── ic_launcher.png ├── mipmap-xhdpi └── ic_launcher.png ├── mipmap-xxhdpi └── ic_launcher.png ├── raw └── android_wear.png └── values ├── strings.xml └── wear.xml /CONTRIBUTING: -------------------------------------------------------------------------------- 1 | # How to become a contributor and submit your own code 2 | 3 | ## Contributor License Agreements 4 | 5 | We'd love to accept your sample apps and patches! Before we can take them, we 6 | have to jump a couple of legal hurdles. 7 | 8 | Please fill out either the individual or corporate Contributor License Agreement (CLA). 9 | 10 | * If you are an individual writing original source code and you're sure you 11 | own the intellectual property, then you'll need to sign an [individual CLA] 12 | (https://cla.developers.google.com). 13 | * If you work for a company that wants to allow you to contribute your work, 14 | then you'll need to sign a [corporate CLA] 15 | (https://cla.developers.google.com). 16 | 17 | Follow either of the two links above to access the appropriate CLA and 18 | instructions for how to sign and return it. Once we receive it, we'll be able to 19 | accept your pull requests. 20 | 21 | ## Contributing A Patch 22 | 23 | 1. Submit an issue describing your proposed change to the repo in question. 24 | 1. The repo owner will respond to your issue promptly. 25 | 1. If your proposed change is accepted, and you haven't already done so, sign a 26 | Contributor License Agreement (see details above). 27 | 1. Fork the desired repo, develop and test your code changes. 28 | 1. Ensure that your code adheres to the existing style in the sample to which 29 | you are contributing. Refer to the 30 | [Android Code Style Guide] 31 | (https://source.android.com/source/code-style.html) for the 32 | recommended coding standards for this organization. 33 | 1. Ensure that your code has an appropriate set of unit tests which all pass. 34 | 1. Submit a pull request. 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | All image and audio files (including *.png, *.jpg, *.svg, *.mp3, *.wav 2 | and *.ogg) are licensed under the CC-BY-NC license. All other files are 3 | licensed under the Apache 2 license. 4 | 5 | ======================================================================= 6 | 7 | Apache License 8 | -------------- 9 | 10 | Version 2.0, January 2004 11 | http://www.apache.org/licenses/ 12 | 13 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 14 | 15 | 1. Definitions. 16 | 17 | "License" shall mean the terms and conditions for use, reproduction, 18 | and distribution as defined by Sections 1 through 9 of this document. 19 | 20 | "Licensor" shall mean the copyright owner or entity authorized by 21 | the copyright owner that is granting the License. 22 | 23 | "Legal Entity" shall mean the union of the acting entity and all 24 | other entities that control, are controlled by, or are under common 25 | control with that entity. For the purposes of this definition, 26 | "control" means (i) the power, direct or indirect, to cause the 27 | direction or management of such entity, whether by contract or 28 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 29 | outstanding shares, or (iii) beneficial ownership of such entity. 30 | 31 | "You" (or "Your") shall mean an individual or Legal Entity 32 | exercising permissions granted by this License. 33 | 34 | "Source" form shall mean the preferred form for making modifications, 35 | including but not limited to software source code, documentation 36 | source, and configuration files. 37 | 38 | "Object" form shall mean any form resulting from mechanical 39 | transformation or translation of a Source form, including but 40 | not limited to compiled object code, generated documentation, 41 | and conversions to other media types. 42 | 43 | "Work" shall mean the work of authorship, whether in Source or 44 | Object form, made available under the License, as indicated by a 45 | copyright notice that is included in or attached to the work 46 | (an example is provided in the Appendix below). 47 | 48 | "Derivative Works" shall mean any work, whether in Source or Object 49 | form, that is based on (or derived from) the Work and for which the 50 | editorial revisions, annotations, elaborations, or other modifications 51 | represent, as a whole, an original work of authorship. For the purposes 52 | of this License, Derivative Works shall not include works that remain 53 | separable from, or merely link (or bind by name) to the interfaces of, 54 | the Work and Derivative Works thereof. 55 | 56 | "Contribution" shall mean any work of authorship, including 57 | the original version of the Work and any modifications or additions 58 | to that Work or Derivative Works thereof, that is intentionally 59 | submitted to Licensor for inclusion in the Work by the copyright owner 60 | or by an individual or Legal Entity authorized to submit on behalf of 61 | the copyright owner. For the purposes of this definition, "submitted" 62 | means any form of electronic, verbal, or written communication sent 63 | to the Licensor or its representatives, including but not limited to 64 | communication on electronic mailing lists, source code control systems, 65 | and issue tracking systems that are managed by, or on behalf of, the 66 | Licensor for the purpose of discussing and improving the Work, but 67 | excluding communication that is conspicuously marked or otherwise 68 | designated in writing by the copyright owner as "Not a Contribution." 69 | 70 | "Contributor" shall mean Licensor and any individual or Legal Entity 71 | on behalf of whom a Contribution has been received by Licensor and 72 | subsequently incorporated within the Work. 73 | 74 | 2. Grant of Copyright License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | copyright license to reproduce, prepare Derivative Works of, 78 | publicly display, publicly perform, sublicense, and distribute the 79 | Work and such Derivative Works in Source or Object form. 80 | 81 | 3. Grant of Patent License. Subject to the terms and conditions of 82 | this License, each Contributor hereby grants to You a perpetual, 83 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 84 | (except as stated in this section) patent license to make, have made, 85 | use, offer to sell, sell, import, and otherwise transfer the Work, 86 | where such license applies only to those patent claims licensable 87 | by such Contributor that are necessarily infringed by their 88 | Contribution(s) alone or by combination of their Contribution(s) 89 | with the Work to which such Contribution(s) was submitted. If You 90 | institute patent litigation against any entity (including a 91 | cross-claim or counterclaim in a lawsuit) alleging that the Work 92 | or a Contribution incorporated within the Work constitutes direct 93 | or contributory patent infringement, then any patent licenses 94 | granted to You under this License for that Work shall terminate 95 | as of the date such litigation is filed. 96 | 97 | 4. Redistribution. You may reproduce and distribute copies of the 98 | Work or Derivative Works thereof in any medium, with or without 99 | modifications, and in Source or Object form, provided that You 100 | meet the following conditions: 101 | 102 | (a) You must give any other recipients of the Work or 103 | Derivative Works a copy of this License; and 104 | 105 | (b) You must cause any modified files to carry prominent notices 106 | stating that You changed the files; and 107 | 108 | (c) You must retain, in the Source form of any Derivative Works 109 | that You distribute, all copyright, patent, trademark, and 110 | attribution notices from the Source form of the Work, 111 | excluding those notices that do not pertain to any part of 112 | the Derivative Works; and 113 | 114 | (d) If the Work includes a "NOTICE" text file as part of its 115 | distribution, then any Derivative Works that You distribute must 116 | include a readable copy of the attribution notices contained 117 | within such NOTICE file, excluding those notices that do not 118 | pertain to any part of the Derivative Works, in at least one 119 | of the following places: within a NOTICE text file distributed 120 | as part of the Derivative Works; within the Source form or 121 | documentation, if provided along with the Derivative Works; or, 122 | within a display generated by the Derivative Works, if and 123 | wherever such third-party notices normally appear. The contents 124 | of the NOTICE file are for informational purposes only and 125 | do not modify the License. You may add Your own attribution 126 | notices within Derivative Works that You distribute, alongside 127 | or as an addendum to the NOTICE text from the Work, provided 128 | that such additional attribution notices cannot be construed 129 | as modifying the License. 130 | 131 | You may add Your own copyright statement to Your modifications and 132 | may provide additional or different license terms and conditions 133 | for use, reproduction, or distribution of Your modifications, or 134 | for any such Derivative Works as a whole, provided Your use, 135 | reproduction, and distribution of the Work otherwise complies with 136 | the conditions stated in this License. 137 | 138 | 5. Submission of Contributions. Unless You explicitly state otherwise, 139 | any Contribution intentionally submitted for inclusion in the Work 140 | by You to the Licensor shall be under the terms and conditions of 141 | this License, without any additional terms or conditions. 142 | Notwithstanding the above, nothing herein shall supersede or modify 143 | the terms of any separate license agreement you may have executed 144 | with Licensor regarding such Contributions. 145 | 146 | 6. Trademarks. This License does not grant permission to use the trade 147 | names, trademarks, service marks, or product names of the Licensor, 148 | except as required for reasonable and customary use in describing the 149 | origin of the Work and reproducing the content of the NOTICE file. 150 | 151 | 7. Disclaimer of Warranty. Unless required by applicable law or 152 | agreed to in writing, Licensor provides the Work (and each 153 | Contributor provides its Contributions) on an "AS IS" BASIS, 154 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 155 | implied, including, without limitation, any warranties or conditions 156 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 157 | PARTICULAR PURPOSE. You are solely responsible for determining the 158 | appropriateness of using or redistributing the Work and assume any 159 | risks associated with Your exercise of permissions under this License. 160 | 161 | 8. Limitation of Liability. In no event and under no legal theory, 162 | whether in tort (including negligence), contract, or otherwise, 163 | unless required by applicable law (such as deliberate and grossly 164 | negligent acts) or agreed to in writing, shall any Contributor be 165 | liable to You for damages, including any direct, indirect, special, 166 | incidental, or consequential damages of any character arising as a 167 | result of this License or out of the use or inability to use the 168 | Work (including but not limited to damages for loss of goodwill, 169 | work stoppage, computer failure or malfunction, or any and all 170 | other commercial damages or losses), even if such Contributor 171 | has been advised of the possibility of such damages. 172 | 173 | 9. Accepting Warranty or Additional Liability. While redistributing 174 | the Work or Derivative Works thereof, You may choose to offer, 175 | and charge a fee for, acceptance of support, warranty, indemnity, 176 | or other liability obligations and/or rights consistent with this 177 | License. However, in accepting such obligations, You may act only 178 | on Your own behalf and on Your sole responsibility, not on behalf 179 | of any other Contributor, and only if You agree to indemnify, 180 | defend, and hold each Contributor harmless for any liability 181 | incurred by, or claims asserted against, such Contributor by reason 182 | of your accepting any such warranty or additional liability. 183 | 184 | END OF TERMS AND CONDITIONS 185 | 186 | APPENDIX: How to apply the Apache License to your work. 187 | 188 | To apply the Apache License to your work, attach the following 189 | boilerplate notice, with the fields enclosed by brackets "{}" 190 | replaced with your own identifying information. (Don't include 191 | the brackets!) The text should be enclosed in the appropriate 192 | comment syntax for the file format. We also recommend that a 193 | file or class name and description of purpose be included on the 194 | same "printed page" as the copyright notice for easier 195 | identification within third-party archives. 196 | 197 | Copyright {yyyy} {name of copyright owner} 198 | 199 | Licensed under the Apache License, Version 2.0 (the "License"); 200 | you may not use this file except in compliance with the License. 201 | You may obtain a copy of the License at 202 | 203 | http://www.apache.org/licenses/LICENSE-2.0 204 | 205 | Unless required by applicable law or agreed to in writing, software 206 | distributed under the License is distributed on an "AS IS" BASIS, 207 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 208 | See the License for the specific language governing permissions and 209 | limitations under the License. 210 | 211 | All image and audio files (including *.png, *.jpg, *.svg, *.mp3, *.wav 212 | and *.ogg) are licensed under the CC-BY-NC license. All other files are 213 | licensed under the Apache 2 license. 214 | 215 | CC-BY-NC License 216 | ---------------- 217 | 218 | Attribution-NonCommercial-ShareAlike 4.0 International 219 | 220 | ======================================================================= 221 | 222 | Creative Commons Corporation ("Creative Commons") is not a law firm and 223 | does not provide legal services or legal advice. Distribution of 224 | Creative Commons public licenses does not create a lawyer-client or 225 | other relationship. Creative Commons makes its licenses and related 226 | information available on an "as-is" basis. Creative Commons gives no 227 | warranties regarding its licenses, any material licensed under their 228 | terms and conditions, or any related information. Creative Commons 229 | disclaims all liability for damages resulting from their use to the 230 | fullest extent possible. 231 | 232 | Using Creative Commons Public Licenses 233 | 234 | Creative Commons public licenses provide a standard set of terms and 235 | conditions that creators and other rights holders may use to share 236 | original works of authorship and other material subject to copyright 237 | and certain other rights specified in the public license below. The 238 | following considerations are for informational purposes only, are not 239 | exhaustive, and do not form part of our licenses. 240 | 241 | Considerations for licensors: Our public licenses are 242 | intended for use by those authorized to give the public 243 | permission to use material in ways otherwise restricted by 244 | copyright and certain other rights. Our licenses are 245 | irrevocable. Licensors should read and understand the terms 246 | and conditions of the license they choose before applying it. 247 | Licensors should also secure all rights necessary before 248 | applying our licenses so that the public can reuse the 249 | material as expected. Licensors should clearly mark any 250 | material not subject to the license. This includes other CC- 251 | licensed material, or material used under an exception or 252 | limitation to copyright. More considerations for licensors: 253 | wiki.creativecommons.org/Considerations_for_licensors 254 | 255 | Considerations for the public: By using one of our public 256 | licenses, a licensor grants the public permission to use the 257 | licensed material under specified terms and conditions. If 258 | the licensor's permission is not necessary for any reason--for 259 | example, because of any applicable exception or limitation to 260 | copyright--then that use is not regulated by the license. Our 261 | licenses grant only permissions under copyright and certain 262 | other rights that a licensor has authority to grant. Use of 263 | the licensed material may still be restricted for other 264 | reasons, including because others have copyright or other 265 | rights in the material. A licensor may make special requests, 266 | such as asking that all changes be marked or described. 267 | Although not required by our licenses, you are encouraged to 268 | respect those requests where reasonable. More_considerations 269 | for the public: 270 | wiki.creativecommons.org/Considerations_for_licensees 271 | 272 | ======================================================================= 273 | 274 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International 275 | Public License 276 | 277 | By exercising the Licensed Rights (defined below), You accept and agree 278 | to be bound by the terms and conditions of this Creative Commons 279 | Attribution-NonCommercial-ShareAlike 4.0 International Public License 280 | ("Public License"). To the extent this Public License may be 281 | interpreted as a contract, You are granted the Licensed Rights in 282 | consideration of Your acceptance of these terms and conditions, and the 283 | Licensor grants You such rights in consideration of benefits the 284 | Licensor receives from making the Licensed Material available under 285 | these terms and conditions. 286 | 287 | 288 | Section 1 -- Definitions. 289 | 290 | a. Adapted Material means material subject to Copyright and Similar 291 | Rights that is derived from or based upon the Licensed Material 292 | and in which the Licensed Material is translated, altered, 293 | arranged, transformed, or otherwise modified in a manner requiring 294 | permission under the Copyright and Similar Rights held by the 295 | Licensor. For purposes of this Public License, where the Licensed 296 | Material is a musical work, performance, or sound recording, 297 | Adapted Material is always produced where the Licensed Material is 298 | synched in timed relation with a moving image. 299 | 300 | b. Adapter's License means the license You apply to Your Copyright 301 | and Similar Rights in Your contributions to Adapted Material in 302 | accordance with the terms and conditions of this Public License. 303 | 304 | c. BY-NC-SA Compatible License means a license listed at 305 | creativecommons.org/compatiblelicenses, approved by Creative 306 | Commons as essentially the equivalent of this Public License. 307 | 308 | d. Copyright and Similar Rights means copyright and/or similar rights 309 | closely related to copyright including, without limitation, 310 | performance, broadcast, sound recording, and Sui Generis Database 311 | Rights, without regard to how the rights are labeled or 312 | categorized. For purposes of this Public License, the rights 313 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 314 | Rights. 315 | 316 | e. Effective Technological Measures means those measures that, in the 317 | absence of proper authority, may not be circumvented under laws 318 | fulfilling obligations under Article 11 of the WIPO Copyright 319 | Treaty adopted on December 20, 1996, and/or similar international 320 | agreements. 321 | 322 | f. Exceptions and Limitations means fair use, fair dealing, and/or 323 | any other exception or limitation to Copyright and Similar Rights 324 | that applies to Your use of the Licensed Material. 325 | 326 | g. License Elements means the license attributes listed in the name 327 | of a Creative Commons Public License. The License Elements of this 328 | Public License are Attribution, NonCommercial, and ShareAlike. 329 | 330 | h. Licensed Material means the artistic or literary work, database, 331 | or other material to which the Licensor applied this Public 332 | License. 333 | 334 | i. Licensed Rights means the rights granted to You subject to the 335 | terms and conditions of this Public License, which are limited to 336 | all Copyright and Similar Rights that apply to Your use of the 337 | Licensed Material and that the Licensor has authority to license. 338 | 339 | j. Licensor means the individual(s) or entity(ies) granting rights 340 | under this Public License. 341 | 342 | k. NonCommercial means not primarily intended for or directed towards 343 | commercial advantage or monetary compensation. For purposes of 344 | this Public License, the exchange of the Licensed Material for 345 | other material subject to Copyright and Similar Rights by digital 346 | file-sharing or similar means is NonCommercial provided there is 347 | no payment of monetary compensation in connection with the 348 | exchange. 349 | 350 | l. Share means to provide material to the public by any means or 351 | process that requires permission under the Licensed Rights, such 352 | as reproduction, public display, public performance, distribution, 353 | dissemination, communication, or importation, and to make material 354 | available to the public including in ways that members of the 355 | public may access the material from a place and at a time 356 | individually chosen by them. 357 | 358 | m. Sui Generis Database Rights means rights other than copyright 359 | resulting from Directive 96/9/EC of the European Parliament and of 360 | the Council of 11 March 1996 on the legal protection of databases, 361 | as amended and/or succeeded, as well as other essentially 362 | equivalent rights anywhere in the world. 363 | 364 | n. You means the individual or entity exercising the Licensed Rights 365 | under this Public License. Your has a corresponding meaning. 366 | 367 | 368 | Section 2 -- Scope. 369 | 370 | a. License grant. 371 | 372 | 1. Subject to the terms and conditions of this Public License, 373 | the Licensor hereby grants You a worldwide, royalty-free, 374 | non-sublicensable, non-exclusive, irrevocable license to 375 | exercise the Licensed Rights in the Licensed Material to: 376 | 377 | a. reproduce and Share the Licensed Material, in whole or 378 | in part, for NonCommercial purposes only; and 379 | 380 | b. produce, reproduce, and Share Adapted Material for 381 | NonCommercial purposes only. 382 | 383 | 2. Exceptions and Limitations. For the avoidance of doubt, where 384 | Exceptions and Limitations apply to Your use, this Public 385 | License does not apply, and You do not need to comply with 386 | its terms and conditions. 387 | 388 | 3. Term. The term of this Public License is specified in Section 389 | 6(a). 390 | 391 | 4. Media and formats; technical modifications allowed. The 392 | Licensor authorizes You to exercise the Licensed Rights in 393 | all media and formats whether now known or hereafter created, 394 | and to make technical modifications necessary to do so. The 395 | Licensor waives and/or agrees not to assert any right or 396 | authority to forbid You from making technical modifications 397 | necessary to exercise the Licensed Rights, including 398 | technical modifications necessary to circumvent Effective 399 | Technological Measures. For purposes of this Public License, 400 | simply making modifications authorized by this Section 2(a) 401 | (4) never produces Adapted Material. 402 | 403 | 5. Downstream recipients. 404 | 405 | a. Offer from the Licensor -- Licensed Material. Every 406 | recipient of the Licensed Material automatically 407 | receives an offer from the Licensor to exercise the 408 | Licensed Rights under the terms and conditions of this 409 | Public License. 410 | 411 | b. Additional offer from the Licensor -- Adapted Material. 412 | Every recipient of Adapted Material from You 413 | automatically receives an offer from the Licensor to 414 | exercise the Licensed Rights in the Adapted Material 415 | under the conditions of the Adapter's License You apply. 416 | 417 | c. No downstream restrictions. You may not offer or impose 418 | any additional or different terms or conditions on, or 419 | apply any Effective Technological Measures to, the 420 | Licensed Material if doing so restricts exercise of the 421 | Licensed Rights by any recipient of the Licensed 422 | Material. 423 | 424 | 6. No endorsement. Nothing in this Public License constitutes or 425 | may be construed as permission to assert or imply that You 426 | are, or that Your use of the Licensed Material is, connected 427 | with, or sponsored, endorsed, or granted official status by, 428 | the Licensor or others designated to receive attribution as 429 | provided in Section 3(a)(1)(A)(i). 430 | 431 | b. Other rights. 432 | 433 | 1. Moral rights, such as the right of integrity, are not 434 | licensed under this Public License, nor are publicity, 435 | privacy, and/or other similar personality rights; however, to 436 | the extent possible, the Licensor waives and/or agrees not to 437 | assert any such rights held by the Licensor to the limited 438 | extent necessary to allow You to exercise the Licensed 439 | Rights, but not otherwise. 440 | 441 | 2. Patent and trademark rights are not licensed under this 442 | Public License. 443 | 444 | 3. To the extent possible, the Licensor waives any right to 445 | collect royalties from You for the exercise of the Licensed 446 | Rights, whether directly or through a collecting society 447 | under any voluntary or waivable statutory or compulsory 448 | licensing scheme. In all other cases the Licensor expressly 449 | reserves any right to collect such royalties, including when 450 | the Licensed Material is used other than for NonCommercial 451 | purposes. 452 | 453 | 454 | Section 3 -- License Conditions. 455 | 456 | Your exercise of the Licensed Rights is expressly made subject to the 457 | following conditions. 458 | 459 | a. Attribution. 460 | 461 | 1. If You Share the Licensed Material (including in modified 462 | form), You must: 463 | 464 | a. retain the following if it is supplied by the Licensor 465 | with the Licensed Material: 466 | 467 | i. identification of the creator(s) of the Licensed 468 | Material and any others designated to receive 469 | attribution, in any reasonable manner requested by 470 | the Licensor (including by pseudonym if 471 | designated); 472 | 473 | ii. a copyright notice; 474 | 475 | iii. a notice that refers to this Public License; 476 | 477 | iv. a notice that refers to the disclaimer of 478 | warranties; 479 | 480 | v. a URI or hyperlink to the Licensed Material to the 481 | extent reasonably practicable; 482 | 483 | b. indicate if You modified the Licensed Material and 484 | retain an indication of any previous modifications; and 485 | 486 | c. indicate the Licensed Material is licensed under this 487 | Public License, and include the text of, or the URI or 488 | hyperlink to, this Public License. 489 | 490 | 2. You may satisfy the conditions in Section 3(a)(1) in any 491 | reasonable manner based on the medium, means, and context in 492 | which You Share the Licensed Material. For example, it may be 493 | reasonable to satisfy the conditions by providing a URI or 494 | hyperlink to a resource that includes the required 495 | information. 496 | 3. If requested by the Licensor, You must remove any of the 497 | information required by Section 3(a)(1)(A) to the extent 498 | reasonably practicable. 499 | 500 | b. ShareAlike. 501 | 502 | In addition to the conditions in Section 3(a), if You Share 503 | Adapted Material You produce, the following conditions also apply. 504 | 505 | 1. The Adapter's License You apply must be a Creative Commons 506 | license with the same License Elements, this version or 507 | later, or a BY-NC-SA Compatible License. 508 | 509 | 2. You must include the text of, or the URI or hyperlink to, the 510 | Adapter's License You apply. You may satisfy this condition 511 | in any reasonable manner based on the medium, means, and 512 | context in which You Share Adapted Material. 513 | 514 | 3. You may not offer or impose any additional or different terms 515 | or conditions on, or apply any Effective Technological 516 | Measures to, Adapted Material that restrict exercise of the 517 | rights granted under the Adapter's License You apply. 518 | 519 | 520 | Section 4 -- Sui Generis Database Rights. 521 | 522 | Where the Licensed Rights include Sui Generis Database Rights that 523 | apply to Your use of the Licensed Material: 524 | 525 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 526 | to extract, reuse, reproduce, and Share all or a substantial 527 | portion of the contents of the database for NonCommercial purposes 528 | only; 529 | 530 | b. if You include all or a substantial portion of the database 531 | contents in a database in which You have Sui Generis Database 532 | Rights, then the database in which You have Sui Generis Database 533 | Rights (but not its individual contents) is Adapted Material, 534 | including for purposes of Section 3(b); and 535 | 536 | c. You must comply with the conditions in Section 3(a) if You Share 537 | all or a substantial portion of the contents of the database. 538 | 539 | For the avoidance of doubt, this Section 4 supplements and does not 540 | replace Your obligations under this Public License where the Licensed 541 | Rights include other Copyright and Similar Rights. 542 | 543 | 544 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 545 | 546 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 547 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 548 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 549 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 550 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 551 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 552 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 553 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 554 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 555 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 556 | 557 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 558 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 559 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 560 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 561 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 562 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 563 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 564 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 565 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 566 | 567 | c. The disclaimer of warranties and limitation of liability provided 568 | above shall be interpreted in a manner that, to the extent 569 | possible, most closely approximates an absolute disclaimer and 570 | waiver of all liability. 571 | 572 | 573 | Section 6 -- Term and Termination. 574 | 575 | a. This Public License applies for the term of the Copyright and 576 | Similar Rights licensed here. However, if You fail to comply with 577 | this Public License, then Your rights under this Public License 578 | terminate automatically. 579 | 580 | b. Where Your right to use the Licensed Material has terminated under 581 | Section 6(a), it reinstates: 582 | 583 | 1. automatically as of the date the violation is cured, provided 584 | it is cured within 30 days of Your discovery of the 585 | violation; or 586 | 587 | 2. upon express reinstatement by the Licensor. 588 | 589 | For the avoidance of doubt, this Section 6(b) does not affect any 590 | right the Licensor may have to seek remedies for Your violations 591 | of this Public License. 592 | 593 | c. For the avoidance of doubt, the Licensor may also offer the 594 | Licensed Material under separate terms or conditions or stop 595 | distributing the Licensed Material at any time; however, doing so 596 | will not terminate this Public License. 597 | 598 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 599 | License. 600 | 601 | 602 | Section 7 -- Other Terms and Conditions. 603 | 604 | a. The Licensor shall not be bound by any additional or different 605 | terms or conditions communicated by You unless expressly agreed. 606 | 607 | b. Any arrangements, understandings, or agreements regarding the 608 | Licensed Material not stated herein are separate from and 609 | independent of the terms and conditions of this Public License. 610 | 611 | 612 | Section 8 -- Interpretation. 613 | 614 | a. For the avoidance of doubt, this Public License does not, and 615 | shall not be interpreted to, reduce, limit, restrict, or impose 616 | conditions on any use of the Licensed Material that could lawfully 617 | be made without permission under this Public License. 618 | 619 | b. To the extent possible, if any provision of this Public License is 620 | deemed unenforceable, it shall be automatically reformed to the 621 | minimum extent necessary to make it enforceable. If the provision 622 | cannot be reformed, it shall be severed from this Public License 623 | without affecting the enforceability of the remaining terms and 624 | conditions. 625 | 626 | c. No term or condition of this Public License will be waived and no 627 | failure to comply consented to unless expressly agreed to by the 628 | Licensor. 629 | 630 | d. Nothing in this Public License constitutes or may be interpreted 631 | as a limitation upon, or waiver of, any privileges and immunities 632 | that apply to the Licensor or You, including from the legal 633 | processes of any jurisdiction or authority. 634 | 635 | ======================================================================= 636 | 637 | Creative Commons is not a party to its public licenses. 638 | Notwithstanding, Creative Commons may elect to apply one of its public 639 | licenses to material it publishes and in those instances will be 640 | considered the "Licensor." Except for the limited purpose of indicating 641 | that material is shared under a Creative Commons public license or as 642 | otherwise permitted by the Creative Commons policies published at 643 | creativecommons.org/policies, Creative Commons does not authorize the 644 | use of the trademark "Creative Commons" or any other trademark or logo 645 | of Creative Commons without its prior written consent including, 646 | without limitation, in connection with any unauthorized modifications 647 | to any of its public licenses or any other arrangements, 648 | understandings, or agreements concerning use of licensed material. For 649 | the avoidance of doubt, this paragraph does not form part of the public 650 | licenses. 651 | 652 | Creative Commons may be contacted at creativecommons.org. 653 | 654 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WclDemoSample 2 | This sample has been deprecated/archived meaning it's read-only and it's no longer actively maintained (more details on archiving can be found [here][1]). 3 | 4 | For other related samples, check out the new [github.com/android/wear-os-samples][2] repo. Thank you! 5 | 6 | [1]: https://help.github.com/en/articles/about-archiving-repositories 7 | [2]: https://github.com/android/wear-os-samples 8 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * imitations under the License. 15 | */ 16 | 17 | 18 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 19 | 20 | buildscript { 21 | repositories { 22 | jcenter() 23 | } 24 | dependencies { 25 | classpath 'com.android.tools.build:gradle:1.3.0' 26 | 27 | // NOTE: Do not place your application dependencies here; they belong 28 | // in the individual module build.gradle files 29 | } 30 | } 31 | 32 | allprojects { 33 | repositories { 34 | jcenter() 35 | } 36 | } 37 | 38 | task clean(type: Delete) { 39 | delete rootProject.buildDir 40 | } 41 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Oct 10 15:11:59 PDT 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /mobile/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /mobile/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * imitations under the License. 15 | */ 16 | apply plugin: 'com.android.application' 17 | 18 | android { 19 | compileSdkVersion 23 20 | buildToolsVersion "23.0.1" 21 | 22 | defaultConfig { 23 | applicationId "com.example.android.wearable.wcldemo" 24 | minSdkVersion 17 25 | targetSdkVersion 23 26 | versionCode 1 27 | versionName "1.0" 28 | } 29 | buildTypes { 30 | release { 31 | minifyEnabled false 32 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 33 | } 34 | } 35 | } 36 | 37 | dependencies { 38 | compile fileTree(include: ['*.jar'], dir: 'libs') 39 | compile project(':..:WearCompanionLibrary:WCL') 40 | compile 'com.android.support:design:23.1.+' 41 | compile project(':shared') 42 | } 43 | -------------------------------------------------------------------------------- /mobile/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in $ANDROID_SDK/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /mobile/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 32 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /mobile/src/main/java/com/example/android/wearable/wcldemo/MobileApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * imitations under the License. 15 | */ 16 | 17 | package com.example.android.wearable.wcldemo; 18 | 19 | import android.app.Application; 20 | 21 | import com.google.android.gms.wearable.DataMap; 22 | import com.google.android.gms.wearable.Node; 23 | import com.google.devrel.wcl.WearManager; 24 | import com.google.devrel.wcl.filters.NearbyFilter; 25 | 26 | import com.example.android.wearable.wcldemo.common.Constants; 27 | 28 | import java.util.Set; 29 | 30 | /** 31 | * The application instance for the mobile app. We need to initialize the {@link WearManager} in the 32 | * {@link #onCreate()} method of the application instance to make sure it is available before any 33 | * other component of the application has been instantiated. 34 | */ 35 | public class MobileApplication extends Application { 36 | 37 | private static String sPackageName; 38 | private static int sCurrentPage = Constants.TARGET_INTRO; 39 | 40 | @Override 41 | public void onCreate() { 42 | super.onCreate(); 43 | WearManager.initialize(getApplicationContext()); 44 | sPackageName = getApplicationContext().getPackageName(); 45 | } 46 | 47 | /** 48 | * A helper method to send a message to the nearby nodes with the information about the pages 49 | * that are being opened as we navigate through this app. This information is used on the 50 | * "Data Exchange" demo page. 51 | */ 52 | public static void sendNavMessage(int page) { 53 | WearManager wearManager = WearManager.getInstance(); 54 | Set nodes = wearManager.getConnectedNodes(); 55 | if (nodes == null) { 56 | return; 57 | } 58 | Set nearbyNodes = new NearbyFilter().filterNodes(nodes); 59 | DataMap dataMap = new DataMap(); 60 | dataMap.putInt(Constants.KEY_PAGE, page); 61 | for(Node node : nearbyNodes) { 62 | wearManager.sendMessage(node.getId(), Constants.NAVIGATION_PATH_MOBILE, dataMap, null); 63 | } 64 | } 65 | 66 | public static void setPage(int page) { 67 | sCurrentPage = page; 68 | sendNavMessage(page); 69 | } 70 | 71 | public static int getPage() { 72 | return sCurrentPage; 73 | } 74 | 75 | /** 76 | * Returns the package name of this app (same on wear or mobile sides) 77 | */ 78 | public static String getPackage() { 79 | return sPackageName; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /mobile/src/main/java/com/example/android/wearable/wcldemo/MobileMainActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * imitations under the License. 15 | */ 16 | 17 | package com.example.android.wearable.wcldemo; 18 | 19 | import android.os.Bundle; 20 | import android.support.design.widget.FloatingActionButton; 21 | import android.support.design.widget.NavigationView; 22 | import android.support.v4.app.Fragment; 23 | import android.support.v4.app.FragmentTransaction; 24 | import android.support.v4.view.GravityCompat; 25 | import android.support.v4.widget.DrawerLayout; 26 | import android.support.v7.app.ActionBarDrawerToggle; 27 | import android.support.v7.app.AppCompatActivity; 28 | import android.support.v7.widget.Toolbar; 29 | import android.util.Log; 30 | import android.view.MenuItem; 31 | import android.view.View; 32 | import android.widget.Toast; 33 | 34 | import com.google.devrel.wcl.WearManager; 35 | 36 | import com.example.android.wearable.wcldemo.common.Constants; 37 | import com.example.android.wearable.wcldemo.pages.DataExchangeFragment; 38 | import com.example.android.wearable.wcldemo.pages.FileTransferFragment; 39 | import com.example.android.wearable.wcldemo.pages.IntroFragment; 40 | import com.example.android.wearable.wcldemo.pages.StockFragment; 41 | import com.example.android.wearable.wcldemo.pages.VoiceFragment; 42 | 43 | /** 44 | * The main activity for this mobile application. It opens up with an introductory page and offers 45 | * a drawer that can take user to different pages; each page show cases one feature of the library. 46 | */ 47 | public class MobileMainActivity extends AppCompatActivity 48 | implements NavigationView.OnNavigationItemSelectedListener { 49 | 50 | private static final String TAG = "MobileMainActivity"; 51 | private static final String WEAR_APP_CAPABILITY = "wear_app_capability"; 52 | 53 | @Override 54 | protected void onCreate(Bundle savedInstanceState) { 55 | super.onCreate(savedInstanceState); 56 | setContentView(R.layout.mobile_main); 57 | Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); 58 | setSupportActionBar(toolbar); 59 | 60 | FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); 61 | fab.setOnClickListener(new View.OnClickListener() { 62 | @Override 63 | public void onClick(View view) { 64 | launchWatchActivity(MobileApplication.getPage()); 65 | } 66 | }); 67 | 68 | DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); 69 | ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( 70 | this, drawer, toolbar, R.string.navigation_drawer_open, 71 | R.string.navigation_drawer_close); 72 | drawer.setDrawerListener(toggle); 73 | toggle.syncState(); 74 | 75 | NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view); 76 | navigationView.setNavigationItemSelectedListener(this); 77 | 78 | 79 | IntroFragment fragment = new IntroFragment(); 80 | getSupportFragmentManager().beginTransaction() 81 | .add(R.id.fragment_container, fragment).commit(); 82 | 83 | if (getIntent() != null && getIntent().getExtras() != null) { 84 | Bundle bundle = getIntent().getExtras(); 85 | int target = bundle.getInt(Constants.KEY_TARGET); 86 | Log.d(TAG, "target = " + target); 87 | navigateTo(target); 88 | } 89 | } 90 | 91 | @Override 92 | public void onBackPressed() { 93 | DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); 94 | if (drawer.isDrawerOpen(GravityCompat.START)) { 95 | drawer.closeDrawer(GravityCompat.START); 96 | } else { 97 | super.onBackPressed(); 98 | } 99 | } 100 | 101 | @Override 102 | public boolean onNavigationItemSelected(MenuItem item) { 103 | int id = item.getItemId(); 104 | 105 | switch (id) { 106 | case R.id.nav_open_menu: 107 | navigateTo(Constants.TARGET_INTRO); 108 | break; 109 | case R.id.nav_open_stock: 110 | navigateTo(Constants.TARGET_STOCK); 111 | break; 112 | case R.id.nav_open_data: 113 | navigateTo(Constants.TARGET_DATA); 114 | break; 115 | case R.id.nav_open_file_transfer: 116 | navigateTo(Constants.TARGET_FILE_TRANSFER); 117 | break; 118 | case R.id.nav_open_voice_stream: 119 | navigateTo(Constants.TARGET_VOICE_STREAM); 120 | break; 121 | 122 | } 123 | 124 | DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); 125 | drawer.closeDrawer(GravityCompat.START); 126 | return true; 127 | } 128 | 129 | private void navigateTo(int target) { 130 | if (MobileApplication.getPage() == target) { 131 | return; 132 | } 133 | Fragment fragment = null; 134 | switch (target) { 135 | case Constants.TARGET_INTRO: 136 | fragment = new IntroFragment(); 137 | break; 138 | case Constants.TARGET_FILE_TRANSFER: 139 | fragment = new FileTransferFragment(); 140 | break; 141 | case Constants.TARGET_STOCK: 142 | fragment = new StockFragment(); 143 | break; 144 | case Constants.TARGET_DATA: 145 | fragment = new DataExchangeFragment(); 146 | break; 147 | case Constants.TARGET_VOICE_STREAM: 148 | fragment = new VoiceFragment(); 149 | break; 150 | } 151 | 152 | if (fragment != null) { 153 | FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); 154 | 155 | transaction.replace(R.id.fragment_container, fragment); 156 | transaction.addToBackStack(null); 157 | 158 | transaction.commit(); 159 | } 160 | } 161 | 162 | /** 163 | * Launches various activities of the wear companion app. 164 | */ 165 | private void launchWatchActivity(int target) { 166 | WearManager wearManager = WearManager.getInstance(); 167 | if (!wearManager.isConnected()) { 168 | toastMessage(R.string.api_client_not_connected); 169 | return; 170 | } 171 | String activityName = null; 172 | switch (target) { 173 | case Constants.TARGET_INTRO: 174 | activityName = ".MyListActivity"; 175 | break; 176 | case Constants.TARGET_FILE_TRANSFER: 177 | activityName = ".pages.FileTransferActivity"; 178 | break; 179 | case Constants.TARGET_STOCK: 180 | activityName = ".pages.StockActivity"; 181 | break; 182 | case Constants.TARGET_DATA: 183 | activityName = ".pages.DataExchangeActivity"; 184 | break; 185 | case Constants.TARGET_VOICE_STREAM: 186 | activityName = ".pages.StreamingVoiceActivity"; 187 | break; 188 | } 189 | if (!wearManager 190 | .launchAppOnNodes(MobileApplication.getPackage() + activityName, null, false, 191 | WEAR_APP_CAPABILITY, null)) { 192 | toastMessage(R.string.no_wearable_device); 193 | } 194 | } 195 | 196 | @Override 197 | protected void onResume() { 198 | super.onResume(); 199 | MobileApplication.setPage(Constants.TARGET_INTRO); 200 | } 201 | 202 | private void toastMessage(int resId) { 203 | Toast.makeText(this, resId, Toast.LENGTH_SHORT).show(); 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /mobile/src/main/java/com/example/android/wearable/wcldemo/pages/DataExchangeFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * imitations under the License. 15 | */ 16 | 17 | package com.example.android.wearable.wcldemo.pages; 18 | 19 | import android.os.Bundle; 20 | import android.support.v4.app.Fragment; 21 | import android.view.LayoutInflater; 22 | import android.view.View; 23 | import android.view.ViewGroup; 24 | import android.widget.TextView; 25 | 26 | import com.google.android.gms.wearable.DataMap; 27 | import com.google.android.gms.wearable.MessageEvent; 28 | import com.google.devrel.wcl.WearManager; 29 | import com.google.devrel.wcl.callbacks.AbstractWearConsumer; 30 | 31 | import com.example.android.wearable.wcldemo.MobileApplication; 32 | import com.example.android.wearable.wcldemo.R; 33 | import com.example.android.wearable.wcldemo.common.Constants; 34 | 35 | /** 36 | * A simple fragment that shows the exchange of data between the phone and wear apps. When this 37 | * activity is in front on the mobile device, user will see messages as the user navigates between 38 | * different pages of the companion wear application. 39 | */ 40 | public class DataExchangeFragment extends Fragment { 41 | 42 | private WearManager mWearManager; 43 | private AbstractWearConsumer mWearConsumer; 44 | private TextView mMessageTextView; 45 | 46 | @Override 47 | public void onCreate(Bundle savedInstanceState) { 48 | super.onCreate(savedInstanceState); 49 | mWearManager = WearManager.getInstance(); 50 | 51 | // We register a listener to be notified when messages arrive while we are on this page. 52 | // We then filter messages based on their path to identify the ones that report on the 53 | // navigation in the companion wear app. When such message is discovered, we write the name 54 | // of new page to the view. 55 | mWearConsumer = new AbstractWearConsumer() { 56 | @Override 57 | public void onWearableMessageReceived(MessageEvent messageEvent) { 58 | if (!Constants.NAVIGATION_PATH_WEAR.equals(messageEvent.getPath())) { 59 | return; 60 | } 61 | DataMap dataMap = DataMap.fromByteArray(messageEvent.getData()); 62 | int currentPage = dataMap.getInt(Constants.KEY_PAGE, Constants.TARGET_INTRO); 63 | writeMessage(currentPage); 64 | } 65 | }; 66 | } 67 | 68 | @Override 69 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 70 | Bundle savedInstanceState) { 71 | View view = inflater.inflate(R.layout.data_exchange, container, false); 72 | mMessageTextView = (TextView) view.findViewById(R.id.message); 73 | return view; 74 | } 75 | 76 | /** 77 | * Mapping the id of page to its name and displaying the name 78 | */ 79 | private void writeMessage(final int page) { 80 | String pageName = null; 81 | switch (page) { 82 | case Constants.TARGET_INTRO: 83 | break; 84 | case Constants.TARGET_DATA: 85 | pageName = getString(R.string.page_data_exchange); 86 | break; 87 | case Constants.TARGET_FILE_TRANSFER: 88 | pageName = getString(R.string.page_file_transfer); 89 | break; 90 | case Constants.TARGET_STOCK: 91 | pageName = getString(R.string.page_stock); 92 | break; 93 | case Constants.TARGET_LIST: 94 | pageName = getString(R.string.page_list); 95 | break; 96 | case Constants.TARGET_LIST_DIALOG: 97 | pageName = getString(R.string.page_list_dialog); 98 | break; 99 | case Constants.TARGET_VOICE_STREAM: 100 | pageName = getString(R.string.page_stream_voice); 101 | break; 102 | default: 103 | pageName = getString(R.string.unknown); 104 | } 105 | final String text = getString(R.string.page_navigation_info, pageName); 106 | getActivity().runOnUiThread(new Runnable() { 107 | @Override 108 | public void run() { 109 | mMessageTextView.setText(text); 110 | } 111 | }); 112 | } 113 | 114 | @Override 115 | public void onResume() { 116 | super.onResume(); 117 | mWearManager.addWearConsumer(mWearConsumer); 118 | MobileApplication.setPage(Constants.TARGET_DATA); 119 | } 120 | 121 | @Override 122 | public void onPause() { 123 | mWearManager.removeWearConsumer(mWearConsumer); 124 | super.onPause(); 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /mobile/src/main/java/com/example/android/wearable/wcldemo/pages/FileTransferFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * imitations under the License. 15 | */ 16 | 17 | package com.example.android.wearable.wcldemo.pages; 18 | 19 | import android.graphics.Bitmap; 20 | import android.graphics.BitmapFactory; 21 | import android.os.AsyncTask; 22 | import android.os.Bundle; 23 | import android.support.v4.app.Fragment; 24 | import android.util.Log; 25 | import android.view.LayoutInflater; 26 | import android.view.View; 27 | import android.view.ViewGroup; 28 | import android.widget.ImageView; 29 | import android.widget.ProgressBar; 30 | import android.widget.TextView; 31 | 32 | import com.google.android.gms.wearable.Channel; 33 | import com.google.android.gms.wearable.WearableStatusCodes; 34 | import com.google.devrel.wcl.WearManager; 35 | import com.google.devrel.wcl.callbacks.AbstractWearConsumer; 36 | 37 | import com.example.android.wearable.wcldemo.MobileApplication; 38 | import com.example.android.wearable.wcldemo.R; 39 | import com.example.android.wearable.wcldemo.common.Constants; 40 | 41 | import java.io.File; 42 | import java.io.FileNotFoundException; 43 | import java.io.IOException; 44 | import java.io.InputStream; 45 | import java.util.Scanner; 46 | 47 | /** 48 | * A fragment that receives the files transferred from the wear app. There are two files that are 49 | * transferred; one is a text file and an image. When the text file is transferred, this fragment 50 | * reads the content of the file and presents that to the user in a text box. When the image starts 51 | * to its transfer, this fragment shows a spinner and when the transfer is complete, it shows the 52 | * image. 53 | */ 54 | public class FileTransferFragment extends Fragment { 55 | 56 | private static final String TAG = "FileTransferFragment"; 57 | private WearManager mWearManager; 58 | private AbstractWearConsumer mWearConsumer; 59 | private ImageView mImageView; 60 | private TextView mTextView; 61 | private AsyncTask mAsyncTask; 62 | private ProgressBar mProgressBar; 63 | 64 | @Override 65 | public void onCreate(Bundle savedInstanceState) { 66 | super.onCreate(savedInstanceState); 67 | setUpWearListeners(); 68 | } 69 | 70 | @Override 71 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 72 | Bundle savedInstanceState) { 73 | View view = inflater.inflate(R.layout.file_transfer, container, false); 74 | mImageView = (ImageView) view.findViewById(R.id.image); 75 | mTextView = (TextView) view.findViewById(R.id.text); 76 | mProgressBar = (ProgressBar) view.findViewById(R.id.progress); 77 | view.findViewById(R.id.clear_image).setOnClickListener(new View.OnClickListener() { 78 | @Override 79 | public void onClick(View v) { 80 | mImageView.setImageResource(R.drawable.ic_photo_200dp); 81 | } 82 | }); 83 | view.findViewById(R.id.clear_text).setOnClickListener(new View.OnClickListener() { 84 | @Override 85 | public void onClick(View v) { 86 | mTextView.setText(R.string.text_file_here); 87 | } 88 | }); 89 | 90 | return view; 91 | } 92 | 93 | /** 94 | * Creates two listeners to be called when the transfer of the text file is completed and when 95 | * a channel and an input stream is available to receive the image file. In some cases, it is 96 | * desired to be transfer files even if the application at the receiving node is not in front. 97 | * In those cases, one can define the same {@link com.google.devrel.wcl.callbacks.WearConsumer} 98 | * in the application instance; then the WearableListener that the WCL library provides will be 99 | * able to handle the transfer. 100 | */ 101 | private void setUpWearListeners() { 102 | mWearManager = WearManager.getInstance(); 103 | mWearConsumer = new AbstractWearConsumer() { 104 | 105 | @Override 106 | public void onWearableInputStreamForChannelOpened(int statusCode, String requestId, 107 | final Channel channel, final InputStream inputStream) { 108 | if (statusCode != WearableStatusCodes.SUCCESS) { 109 | Log.e(TAG, "onWearableInputStreamForChannelOpened(): " 110 | + "Failed to get input stream"); 111 | return; 112 | } 113 | Log.d(TAG, "Channel opened for path: " + channel.getPath()); 114 | mAsyncTask = new AsyncTask() { 115 | 116 | @Override 117 | protected void onPreExecute() { 118 | mImageView.setImageResource(R.drawable.ic_photo_200dp); 119 | mProgressBar.setVisibility(View.VISIBLE); 120 | } 121 | 122 | @Override 123 | protected Bitmap doInBackground(Void... params) { 124 | Bitmap bitmap = BitmapFactory.decodeStream(inputStream); 125 | closeStreams(); 126 | if (isCancelled()) { 127 | return null; 128 | } 129 | return bitmap; 130 | } 131 | 132 | @Override 133 | protected void onCancelled() { 134 | mProgressBar.setVisibility(View.GONE); 135 | mAsyncTask = null; 136 | closeStreams(); 137 | } 138 | 139 | @Override 140 | protected void onPostExecute(Bitmap bitmap) { 141 | mProgressBar.setVisibility(View.GONE); 142 | mImageView.setImageBitmap(bitmap); 143 | mAsyncTask = null; 144 | } 145 | 146 | public void closeStreams() { 147 | try { 148 | if (inputStream != null) { 149 | inputStream.close(); 150 | } 151 | } catch (IOException e) { 152 | // no-op 153 | } 154 | } 155 | }; 156 | mAsyncTask.execute(); 157 | } 158 | 159 | @Override 160 | public void onWearableFileReceivedResult(int statusCode, String requestId, 161 | File savedFile, String originalName) { 162 | Log.d(TAG, String.format( 163 | "File Received: status=%d, requestId=%s, savedLocation=%s, originalName=%s", 164 | statusCode, requestId, savedFile.getAbsolutePath(), originalName)); 165 | String fileContent = getSimpleTextFileContent(savedFile); 166 | mTextView.setText(fileContent); 167 | } 168 | 169 | }; 170 | } 171 | 172 | /** 173 | * A rudimentary method to read the content of the {@code file}. 174 | */ 175 | private String getSimpleTextFileContent(File file) { 176 | if (file == null || !file.exists()) { 177 | throw new IllegalArgumentException("file is null or doesn't exists!"); 178 | } 179 | try { 180 | return new Scanner(file).useDelimiter("\\A").next(); 181 | } catch (FileNotFoundException e) { 182 | // already captured 183 | } 184 | return null; 185 | } 186 | 187 | @Override 188 | public void onResume() { 189 | super.onResume(); 190 | 191 | // register our listeners 192 | mWearManager.addWearConsumer(mWearConsumer); 193 | 194 | // add the local capability to handle file transfer 195 | mWearManager.addCapabilities(Constants.CAPABILITY_FILE_PROCESSOR); 196 | 197 | MobileApplication.setPage(Constants.TARGET_FILE_TRANSFER); 198 | } 199 | 200 | @Override 201 | public void onPause() { 202 | // unregister our listeners 203 | mWearManager.removeWearConsumer(mWearConsumer); 204 | 205 | // remove the capability to handle file transfer 206 | mWearManager.removeCapabilities(Constants.CAPABILITY_FILE_PROCESSOR); 207 | 208 | if (mAsyncTask != null) { 209 | mAsyncTask.cancel(true); 210 | mAsyncTask = null; 211 | } 212 | super.onPause(); 213 | } 214 | } 215 | -------------------------------------------------------------------------------- /mobile/src/main/java/com/example/android/wearable/wcldemo/pages/IntroFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * imitations under the License. 15 | */ 16 | 17 | package com.example.android.wearable.wcldemo.pages; 18 | 19 | import android.os.Bundle; 20 | import android.support.v4.app.Fragment; 21 | import android.view.LayoutInflater; 22 | import android.view.View; 23 | import android.view.ViewGroup; 24 | 25 | import com.example.android.wearable.wcldemo.MobileApplication; 26 | import com.example.android.wearable.wcldemo.R; 27 | import com.example.android.wearable.wcldemo.common.Constants; 28 | 29 | /** 30 | * The introductory fragment. 31 | */ 32 | public class IntroFragment extends Fragment { 33 | 34 | @Override 35 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 36 | Bundle savedInstanceState) { 37 | return inflater.inflate(R.layout.intro_fragment, container, false); 38 | } 39 | 40 | @Override 41 | public void onResume() { 42 | super.onResume(); 43 | MobileApplication.setPage(Constants.TARGET_INTRO); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /mobile/src/main/java/com/example/android/wearable/wcldemo/pages/StockFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * imitations under the License. 15 | */ 16 | 17 | package com.example.android.wearable.wcldemo.pages; 18 | 19 | import android.os.Bundle; 20 | import android.os.Handler; 21 | import android.support.v4.app.Fragment; 22 | import android.text.TextUtils; 23 | import android.util.Log; 24 | import android.view.LayoutInflater; 25 | import android.view.View; 26 | import android.view.ViewGroup; 27 | import android.widget.TextView; 28 | import android.widget.Toast; 29 | 30 | import com.google.android.gms.common.api.CommonStatusCodes; 31 | import com.google.android.gms.common.api.ResultCallback; 32 | import com.google.android.gms.wearable.MessageApi; 33 | import com.google.devrel.wcl.WearManager; 34 | import com.google.devrel.wcl.callbacks.AbstractWearConsumer; 35 | import com.google.devrel.wcl.connectivity.WearHttpHelper; 36 | 37 | import com.example.android.wearable.wcldemo.MobileApplication; 38 | import com.example.android.wearable.wcldemo.R; 39 | import com.example.android.wearable.wcldemo.common.Constants; 40 | 41 | import java.io.BufferedReader; 42 | import java.io.IOException; 43 | import java.io.InputStreamReader; 44 | import java.io.OutputStream; 45 | import java.net.HttpURLConnection; 46 | import java.net.URL; 47 | import java.net.URLConnection; 48 | 49 | /** 50 | * A fragment that shows how a wear application can use the companion app on a phone to perform 51 | * network calls on its behalf. In this fragment, when we receive such a request from the wear 52 | * device, we show a bit of information about the request, such as the url for the request and the 53 | * nodeId of the node that sent the request. Then this fragment makes the network call and when it 54 | * has the response, it forwards the response to the originating node and show the status of the 55 | * response on the screen. 56 | */ 57 | public class StockFragment extends Fragment { 58 | 59 | private static final String TAG = "StockFragment"; 60 | private WearManager mWearManager; 61 | private AbstractWearConsumer mWearConsumer; 62 | private TextView mMessageView; 63 | private Handler mHandler; 64 | 65 | // A callback to report the status of the response 66 | private ResultCallback mResultCallback 67 | = new ResultCallback() { 68 | @Override 69 | public void onResult(MessageApi.SendMessageResult sendMessageResult) { 70 | String message; 71 | if (sendMessageResult.getStatus().isSuccess()) { 72 | message = "Response: sent the response to device"; 73 | } else { 74 | message = "Response: failed to send the response"; 75 | } 76 | writeMessage(message, true); 77 | } 78 | }; 79 | 80 | @Override 81 | public void onCreate(Bundle savedInstanceState) { 82 | super.onCreate(savedInstanceState); 83 | mHandler = new Handler(); 84 | setUpWearListeners(); 85 | } 86 | 87 | private void setUpWearListeners() { 88 | mWearManager = WearManager.getInstance(); 89 | 90 | // Registering a listener to inform us when an http request is coming in from another node 91 | // and also when we know the status of the response sent back to the originating node 92 | mWearConsumer = new AbstractWearConsumer() { 93 | @Override 94 | public void onWearableSendMessageResult(int statusCode) { 95 | if (statusCode != CommonStatusCodes.SUCCESS) { 96 | Log.d(TAG, "Failed to send message, statusCode: " + statusCode); 97 | Toast.makeText(getContext(), 98 | getString(R.string.failed_to_launch_wear_app), 99 | Toast.LENGTH_SHORT).show(); 100 | } 101 | } 102 | 103 | @Override 104 | public void onWearableHttpRequestReceived(String url, String method, String query, 105 | String charset, String nodeId, String requestId) { 106 | String message = String.format("Node Id: %s\n\nUrl: %s\n", nodeId, url); 107 | writeMessage("An Http Request received:\n\n" + message, false); 108 | handleHttpRequest(url, method, query, charset, nodeId, requestId); 109 | } 110 | 111 | }; 112 | } 113 | 114 | @Override 115 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 116 | Bundle savedInstanceState) { 117 | View view = inflater.inflate(R.layout.stock, container, false); 118 | mMessageView = (TextView) view.findViewById(R.id.message); 119 | 120 | return view; 121 | } 122 | 123 | 124 | private void handleHttpRequest(final String url, final String method, final String query, 125 | final String charset, final String nodeId, final String requestId) { 126 | new Thread(new Runnable() { 127 | @Override 128 | public void run() { 129 | try { 130 | makeHttpCall(url, method, query, charset, nodeId, requestId); 131 | } catch (IOException e) { 132 | Log.e(TAG, "Failed to make the http call", e); 133 | WearManager.getInstance() 134 | .sendHttpResponse("", HttpURLConnection.HTTP_BAD_REQUEST, nodeId, 135 | requestId, mResultCallback); 136 | } 137 | } 138 | }).start(); 139 | 140 | } 141 | 142 | 143 | /** 144 | * A simple method that handles making an http request. Although we simplify this example since 145 | * we know what type of request is coming in, we leave it at a more generic standing to show 146 | * how a more complicated case can be handled. 147 | * 148 | * @param url The target URL. For GET operations, all the query parameters need to be included 149 | * here directly. For POST requests, use the query parameter. 150 | * @param method Can be {@link com.google.devrel.wcl.connectivity.WearHttpHelper#METHOD_GET} 151 | * or {@link com.google.devrel.wcl.connectivity.WearHttpHelper#METHOD_POST} 152 | * @param query Used for POST requests. The format should be 153 | * param1=value1¶m2=value2&.. 154 | * and it value1, value2, ... should all be URLEncoded by the caller. 155 | * 156 | * @throws IOException 157 | */ 158 | private void makeHttpCall(String url, String method, String query, String charset, 159 | String nodeId, String requestId) throws IOException { 160 | URLConnection urlConnection = new URL(url).openConnection(); 161 | urlConnection.setRequestProperty("Accept-Charset", charset); 162 | // Note: the following if-clause will not be executed for this particular example 163 | if (WearHttpHelper.METHOD_POST.equals(method)) { 164 | urlConnection.setDoOutput(true); 165 | urlConnection.setRequestProperty("Content-Type", 166 | "application/x-www-form-urlencoded;charset=" + charset); 167 | if (!TextUtils.isEmpty(query)) { 168 | OutputStream output = urlConnection.getOutputStream(); 169 | output.write(query.getBytes(charset)); 170 | } 171 | } 172 | BufferedReader in = new BufferedReader( 173 | new InputStreamReader(urlConnection.getInputStream())); 174 | String inputLine; 175 | StringBuilder sb = new StringBuilder(); 176 | while ((inputLine = in.readLine()) != null) { 177 | sb.append(inputLine); 178 | } 179 | in.close(); 180 | int statusCode = ((HttpURLConnection) urlConnection).getResponseCode(); 181 | WearManager.getInstance().sendHttpResponse(sb.toString(), statusCode, nodeId, requestId, 182 | mResultCallback); 183 | } 184 | 185 | /** 186 | * Write a message to the display; it can append to the existing message if {@code append} is 187 | * {@code true}. 188 | */ 189 | private void writeMessage(final String message, final boolean append) { 190 | mHandler.post(new Runnable() { 191 | @Override 192 | public void run() { 193 | String msg = message; 194 | if (append) { 195 | msg = mMessageView.getText().toString() + "\n" + msg; 196 | } 197 | mMessageView.setText(msg); 198 | } 199 | }); 200 | } 201 | 202 | @Override 203 | public void onPause() { 204 | mWearManager.removeWearConsumer(mWearConsumer); 205 | mWearManager.removeCapabilities(Constants.CAPABILITY_HTTP_HANDLER); 206 | super.onPause(); 207 | } 208 | 209 | @Override 210 | public void onResume() { 211 | super.onResume(); 212 | mWearManager.addWearConsumer(mWearConsumer); 213 | mWearManager.addCapabilities(Constants.CAPABILITY_HTTP_HANDLER); 214 | MobileApplication.setPage(Constants.TARGET_STOCK); 215 | writeMessage("", false); 216 | } 217 | } 218 | -------------------------------------------------------------------------------- /mobile/src/main/java/com/example/android/wearable/wcldemo/pages/VoiceFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Google Inc. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * imitations under the License. 15 | */ 16 | 17 | package com.example.android.wearable.wcldemo.pages; 18 | 19 | import android.os.Bundle; 20 | import android.support.annotation.Nullable; 21 | import android.support.v4.app.Fragment; 22 | import android.util.Log; 23 | import android.view.LayoutInflater; 24 | import android.view.View; 25 | import android.view.ViewGroup; 26 | import android.widget.TextView; 27 | 28 | import com.google.android.gms.wearable.Channel; 29 | import com.google.android.gms.wearable.WearableStatusCodes; 30 | import com.google.devrel.wcl.WearManager; 31 | import com.google.devrel.wcl.callbacks.AbstractWearConsumer; 32 | import com.google.devrel.wcl.widgets.recording.WclSoundManager; 33 | 34 | import com.example.android.wearable.wcldemo.MobileApplication; 35 | import com.example.android.wearable.wcldemo.R; 36 | import com.example.android.wearable.wcldemo.common.Constants; 37 | 38 | import java.io.InputStream; 39 | 40 | /** 41 | * The introductory fragment. 42 | */ 43 | public class VoiceFragment extends Fragment { 44 | 45 | private static final String TAG = "VoiceFragment"; 46 | private WearManager mWearManager; 47 | private AbstractWearConsumer mWearConsumer; 48 | private WclSoundManager mSoundManager; 49 | private TextView mMessageView; 50 | 51 | @Override 52 | public void onCreate(Bundle savedInstanceState) { 53 | super.onCreate(savedInstanceState); 54 | setUpWearListeners(); 55 | } 56 | 57 | @Override 58 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 59 | Bundle savedInstanceState) { 60 | View view = inflater.inflate(R.layout.voice_fragment, container, false); 61 | mMessageView = (TextView) view.findViewById(R.id.message); 62 | return view; 63 | } 64 | 65 | /** 66 | * Creates a listener to be called when a channel and an input stream is available to receive 67 | * sound stream. 68 | */ 69 | private void setUpWearListeners() { 70 | mWearManager = WearManager.getInstance(); 71 | mWearConsumer = new AbstractWearConsumer() { 72 | 73 | @Override 74 | public void onWearableInputStreamForChannelOpened(int statusCode, String requestId, 75 | final Channel channel, final InputStream inputStream) { 76 | if (statusCode != WearableStatusCodes.SUCCESS) { 77 | Log.e(TAG, "onWearableInputStreamForChannelOpened(): " 78 | + "Failed to get input stream"); 79 | return; 80 | } 81 | Log.d(TAG, "Channel opened for path: " + channel.getPath()); 82 | mMessageView.setText(R.string.voice_stream_started); 83 | mSoundManager = new WclSoundManager(getActivity()); 84 | mSoundManager.play(inputStream, new WclSoundManager.OnVoicePlaybackFinishedListener() { 85 | @Override 86 | public void onPlaybackFinished(int reason, @Nullable String reasonMessage) { 87 | Log.d(TAG, "Voice ended with reason: " + reason); 88 | mMessageView.setText(R.string.voice_stream_ended); 89 | } 90 | }); 91 | } 92 | 93 | }; 94 | } 95 | 96 | @Override 97 | public void onResume() { 98 | super.onResume(); 99 | mWearManager.addWearConsumer(mWearConsumer); 100 | mWearManager.addCapabilities(Constants.CAPABILITY_VOICE_PROCESSING); 101 | MobileApplication.setPage(Constants.TARGET_VOICE_STREAM); 102 | } 103 | 104 | @Override 105 | public void onPause() { 106 | mWearManager.removeWearConsumer(mWearConsumer); 107 | mWearManager.removeCapabilities(Constants.CAPABILITY_VOICE_PROCESSING); 108 | if (mSoundManager != null) { 109 | mSoundManager.cleanUp(); 110 | } 111 | super.onPause(); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-hdpi/ic_file_download_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-hdpi/ic_file_download_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-hdpi/ic_home_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-hdpi/ic_home_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-hdpi/ic_import_export_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-hdpi/ic_import_export_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-hdpi/ic_mic_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-hdpi/ic_mic_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-hdpi/ic_photo_200dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-hdpi/ic_photo_200dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-hdpi/ic_trending_up_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-hdpi/ic_trending_up_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-hdpi/ic_watch_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-hdpi/ic_watch_white_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-mdpi/ic_file_download_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-mdpi/ic_file_download_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-mdpi/ic_home_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-mdpi/ic_home_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-mdpi/ic_import_export_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-mdpi/ic_import_export_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-mdpi/ic_mic_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-mdpi/ic_mic_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-mdpi/ic_photo_200dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-mdpi/ic_photo_200dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-mdpi/ic_trending_up_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-mdpi/ic_trending_up_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-mdpi/ic_watch_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-mdpi/ic_watch_white_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xhdpi/ic_file_download_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xhdpi/ic_file_download_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xhdpi/ic_home_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xhdpi/ic_home_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xhdpi/ic_import_export_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xhdpi/ic_import_export_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xhdpi/ic_mic_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xhdpi/ic_mic_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xhdpi/ic_photo_200dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xhdpi/ic_photo_200dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xhdpi/ic_trending_up_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xhdpi/ic_trending_up_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xhdpi/ic_watch_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xhdpi/ic_watch_white_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xxhdpi/ic_file_download_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xxhdpi/ic_file_download_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xxhdpi/ic_home_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xxhdpi/ic_home_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xxhdpi/ic_import_export_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xxhdpi/ic_import_export_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xxhdpi/ic_mic_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xxhdpi/ic_mic_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xxhdpi/ic_photo_200dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xxhdpi/ic_photo_200dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xxhdpi/ic_trending_up_grey_200_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xxhdpi/ic_trending_up_grey_200_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xxhdpi/ic_watch_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xxhdpi/ic_watch_white_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xxxhdpi/ic_photo_200dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xxxhdpi/ic_photo_200dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xxxhdpi/ic_watch_white_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlearchive/android-WclDemoSample/44fe2d183ae066c6a4fc882d37cd09ebd2bba1d2/mobile/src/main/res/drawable-xxxhdpi/ic_watch_white_48dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 26 | -------------------------------------------------------------------------------- /mobile/src/main/res/layout/app_bar_mobile_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 24 | 25 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /mobile/src/main/res/layout/content_mobile_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 30 | 31 | 35 | 36 | -------------------------------------------------------------------------------- /mobile/src/main/res/layout/data_exchange.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 28 | 29 | 36 | 37 | -------------------------------------------------------------------------------- /mobile/src/main/res/layout/file_transfer.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 28 | 32 | 33 |