Loading docs/html/training/wearables/apps/creating.jd +7 −1 Original line number Diff line number Diff line Loading @@ -89,10 +89,16 @@ types of screen shapes, which is useful for testing.</p> <li>Install the Android Wear app, available on Google Play, on your handheld.</li> <li>Follow the app's instructions to pair your handheld with your wearable. This allows you to test out synced handheld notifications, if you're building them.</li> <li>Leave the Android Wear app open on your phone.</li> <li>Connect the wearable to your machine through USB, so you can install apps directly to it as you develop.</li> as you develop. A message appears on both the wearable and the Android Wear app prompting you to allow debugging.</li> <li>On the Android Wear app, check <strong>Always allow from this computer</strong> and tap <strong>OK</strong>.</li> </ol> <p>The <strong>Android</strong> tool window on Android Studio shows the system log from the wearable. The wearable should also be listed when you run the <code>adb devices</code> command.</p> <h2 id="CreateProject">Create a Project</h2> <p>To begin development, create an app project that contains Loading docs/html/training/wearables/data-layer/accessing.jd +10 −2 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ GoogleApiClient mGoogleAppiClient = new GoogleApiClient.Builder(this) @Override public void onConnected(Bundle connectionHint) { Log.d(TAG, "onConnected: " + connectionHint); // Now you can use the data layer API } @Override public void onConnectionSuspended(int cause) { Loading @@ -57,3 +58,10 @@ GoogleApiClient mGoogleAppiClient = new GoogleApiClient.Builder(this) .addApi(Wearable.API) .build(); </pre> <p>Before you use the data layer API, start a connection on your client by calling the <a href="{@docRoot}reference/com/google/android/gms/common/api/GoogleApiClient.html#connect()">connect()</a> method, as described in <a href="{@docRoot}google/auth/api-client.html#Starting">Accessing Google Play services APIs</a>. When the system invokes the <code>onConnected()</code> callback for your client, you're ready to use the data layer API.</p> No newline at end of file Loading
docs/html/training/wearables/apps/creating.jd +7 −1 Original line number Diff line number Diff line Loading @@ -89,10 +89,16 @@ types of screen shapes, which is useful for testing.</p> <li>Install the Android Wear app, available on Google Play, on your handheld.</li> <li>Follow the app's instructions to pair your handheld with your wearable. This allows you to test out synced handheld notifications, if you're building them.</li> <li>Leave the Android Wear app open on your phone.</li> <li>Connect the wearable to your machine through USB, so you can install apps directly to it as you develop.</li> as you develop. A message appears on both the wearable and the Android Wear app prompting you to allow debugging.</li> <li>On the Android Wear app, check <strong>Always allow from this computer</strong> and tap <strong>OK</strong>.</li> </ol> <p>The <strong>Android</strong> tool window on Android Studio shows the system log from the wearable. The wearable should also be listed when you run the <code>adb devices</code> command.</p> <h2 id="CreateProject">Create a Project</h2> <p>To begin development, create an app project that contains Loading
docs/html/training/wearables/data-layer/accessing.jd +10 −2 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ GoogleApiClient mGoogleAppiClient = new GoogleApiClient.Builder(this) @Override public void onConnected(Bundle connectionHint) { Log.d(TAG, "onConnected: " + connectionHint); // Now you can use the data layer API } @Override public void onConnectionSuspended(int cause) { Loading @@ -57,3 +58,10 @@ GoogleApiClient mGoogleAppiClient = new GoogleApiClient.Builder(this) .addApi(Wearable.API) .build(); </pre> <p>Before you use the data layer API, start a connection on your client by calling the <a href="{@docRoot}reference/com/google/android/gms/common/api/GoogleApiClient.html#connect()">connect()</a> method, as described in <a href="{@docRoot}google/auth/api-client.html#Starting">Accessing Google Play services APIs</a>. When the system invokes the <code>onConnected()</code> callback for your client, you're ready to use the data layer API.</p> No newline at end of file