README.md
1 Android EmbeddedApp Sample
2 ===================================
3
4 This simple app demonstrates how to embed a wearable app into a phone app.
5
6 Introduction
7 ------------
8
9 Wearable apps can be installed directly onto Android Wear devices during development, using either a direct ADB
10 connection or ADB-over-Bluetooth. However, when releasing your app to end users, you must package your
11 wearable APK inside of a traditional APK for distribution via a paired phone.
12
13 When end users install this APK onto their phone, the wearable APK will be automatically detected, extracted, and pushed
14 to their any paired wearable devices.
15
16 This sample demonstrates how to properly package a wearable app for release in this manner. The wearable app is inside
17 the `Wearable` directory, and the phone app (which will be used as a container for distribution) is the `Application`
18 directory. There is nothing special about these apps, other than the `wearApp` dependency in the (host) phone app's
19 `build.gradle` file:
20
21 ```groovy
22 dependencies {
23 compile 'com.google.android.gms:play-services-wearable:6.5.+'
24 wearApp project(':Wearable')
25 }
26 ```
27
28 This dependency will automatically package the wearable APK during a **release build** (e.g. using the "Build > Generate
29 Signed APK..." command in Android Studio). Note that this packaging is **not** performed for debug builds for
30 performance reasons. During development, your wearable and phone apps must still be pushed individually to their
31 respective devices using an ADB connection.
32
33 Pre-requisites
34 --------------
35
36 - Android SDK v21
37 - Android Build Tools v21.1.1
38 - Android Support Repository
39
40 Screenshots
41 -------------
42
43 <img src="screenshots/embedded_wearable_app.png" height="400" alt="Screenshot"/> <img src="screenshots/phone_app.png" height="400" alt="Screenshot"/>
44
45 Getting Started
46 ---------------
47
48 This sample uses the Gradle build system. To build this project, use the
49 "gradlew build" command or use "Import Project" in Android Studio.
50
51 Support
52 -------
53
54 - Google+ Community: https://plus.google.com/communities/105153134372062985968
55 - Stack Overflow: http://stackoverflow.com/questions/tagged/android
56
57 If you've found an error in this sample, please file an issue:
58 https://github.com/googlesamples/android-EmbeddedApp
59
60 Patches are encouraged, and may be submitted by forking this project and
61 submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
62
63 License
64 -------
65
66 Copyright 2014 The Android Open Source Project, Inc.
67
68 Licensed to the Apache Software Foundation (ASF) under one or more contributor
69 license agreements. See the NOTICE file distributed with this work for
70 additional information regarding copyright ownership. The ASF licenses this
71 file to you under the Apache License, Version 2.0 (the "License"); you may not
72 use this file except in compliance with the License. You may obtain a copy of
73 the License at
74
75 http://www.apache.org/licenses/LICENSE-2.0
76
77 Unless required by applicable law or agreed to in writing, software
78 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
79 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
80 License for the specific language governing permissions and limitations under
81 the License.
82