1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119<!DOCTYPE html>
120<html devsite>
121<head>
122
123
124    <meta name="top_category" value="develop" />
125
126    <meta name="subcategory" value="reference" />
127
128
129      <meta name="book_path" value="/reference/android/support/wearable/_book.yaml" />
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145<title>WatchFaceCompanion</title>
146
147
148</head>
149
150<body class="gc-documentation develop reference api apilevel-">
151<div id="doc-api-level" class="" style="display:none"></div>
152
153
154
155
156<div id="naMessage"></div>
157
158<div id="api-info-block">
159<div class="api-level">
160
161
162
163
164</div>
165
166
167
168
169
170
171
172
173
174
175
176<div class="sum-details-links">
177
178Summary:
179
180
181
182
183
184  <a href="#constants">Constants</a>
185
186
187
188
189
190
191
192
193
194
195  &#124; <a href="#inhmethods">Inherited Methods</a>
196
197&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
198
199</div><!-- end sum-details-links -->
200</div><!-- end api-info-block -->
201
202<div class="api apilevel-" id="jd-content">
203
204<!-- ======== START OF CLASS DATA ======== -->
205
206<h1 class="api-title">WatchFaceCompanion</h1>
207<p>
208<code class="api-signature">
209  public
210
211  final
212
213  class
214  WatchFaceCompanion
215</code>
216<br>
217
218
219<code class="api-signature">
220
221    extends Object
222
223
224
225</code>
226
227<code class="api-signature">
228
229
230
231</code>
232
233</p><table class="jd-inheritance-table">
234
235
236  <tr>
237
238    <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object
239    </td>
240  </tr>
241
242
243  <tr>
244
245      <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
246
247    <td colspan="1" class="jd-inheritance-class-cell">android.support.wearable.companion.WatchFaceCompanion
248    </td>
249  </tr>
250
251
252</table>
253
254
255
256
257<br><hr>
258
259
260  <p>Constants for use by watch face configuration activities.
261
262 <p>To register a configuration activity for a watch face, add a <code>&lt;meta-data&gt;</code>
263 entry to the watch face component in its Android Manifest file with an intent action to be
264 fired to start the activity. The following meta-data will register the
265 <code>com.example.watchface.CONFIG_DIGITAL</code> action to be started when configuring a watch
266 face on the wearable device:
267
268 <pre class="prettyprint">
269 &lt;meta-data
270     android:name="com.google.android.wearable.watchface.wearableConfigurationAction"
271     android:value="com.example.watchface.CONFIG_DIGITAL" /&gt;</pre>
272
273 <p>To register a configuration activity to be started on a companion phone,
274 add the following alternative meta-data entry to the watch face component:
275
276 <pre class="prettyprint">
277 &lt;meta-data
278     android:name="com.google.android.wearable.watchface.companionConfigurationAction"
279     android:value="com.example.watchface.CONFIG_DIGITAL" /&gt;</pre>
280
281 <p>The activity should have an intent filter which lists the action specified in the
282 meta-data block above, in addition to the two categories present in the
283 following example:
284
285 <pre class="prettyprint">
286 &lt;activity android:name=".MyWatchFaceConfigActivity"&gt;
287     &lt;intent-filter&gt;
288         &lt;action android:name="com.example.watchface.CONFIG_DIGITAL" /&gt;
289         &lt;category android:name="com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION" /&gt;
290         &lt;category android:name="android.intent.category.DEFAULT" /&gt;
291     &lt;/intent-filter&gt;
292 &lt;/activity&gt;</pre>
293
294 <p>For phone side configuration activities, substitute the category
295 <code>com.google.android.wearable.watchface.category.COMPANION_CONFIGURATION</code> for
296 <code>com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION</code>.
297</p>
298
299
300
301
302
303
304
305<h2 class="api-section">Summary</h2>
306
307
308
309
310
311
312
313
314
315
316
317
318
319<!-- =========== ENUM CONSTANT SUMMARY =========== -->
320<table id="constants" class="responsive constants">
321<tr><th colspan="2"><h3>Constants</h3></th></tr>
322
323
324
325    <tr class="api apilevel-" >
326        <td><code>String</code></td>
327        <td width="100%">
328          <code><a href="/reference/android/support/wearable/companion/WatchFaceCompanion.html#EXTRA_PEER_ID">EXTRA_PEER_ID</a></code>
329          <p>The key for <code><a href="/reference/java/lang/String.html">String</a></code> extra specifying the ID of the currently connected device in the
330 phone-side config activity launch <code><a href="/reference/android/content/Intent.html">Intent</a></code>.
331
332
333</p>
334        </td>
335    </tr>
336
337
338    <tr class="api apilevel-" >
339        <td><code>String</code></td>
340        <td width="100%">
341          <code><a href="/reference/android/support/wearable/companion/WatchFaceCompanion.html#EXTRA_WATCH_FACE_COMPONENT">EXTRA_WATCH_FACE_COMPONENT</a></code>
342          <p>The key for <code><a href="/reference/java/lang/String.html">String</a></code> extra specifying a <code><a href="/reference/android/content/ComponentName.html">ComponentName</a></code> of the
343 watch face being configured in the config activity launch <code><a href="/reference/android/content/Intent.html">Intent</a></code>.
344
345
346</p>
347        </td>
348    </tr>
349
350
351
352</table>
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374<!-- ========== METHOD SUMMARY =========== -->
375<table id="inhmethods" class="methods inhtable">
376<tr><th><h3>Inherited methods</h3></th></tr>
377
378
379<tr class="api apilevel-" >
380<td colspan="2">
381
382  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
383          ><img height="34" id="inherited-methods-java.lang.Object-trigger"
384          src="/assets/images/styles/disclosure_down.png"
385          class="jd-expando-trigger-img" /></a>From
386class
387<code>
388
389    java.lang.Object
390
391</code>
392<div id="inherited-methods-java.lang.Object">
393  <div id="inherited-methods-java.lang.Object-list"
394        class="jd-inheritedlinks">
395  </div>
396  <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
397    <table class="jd-sumtable-expando responsive">
398
399
400
401
402  <tr class="api apilevel-" >
403
404
405    <td><code>
406
407
408
409
410
411        Object</code>
412    </td>
413
414    <td width="100%">
415      <code>
416      clone()
417      </code>
418
419    </td>
420  </tr>
421
422
423
424  <tr class="api apilevel-" >
425
426
427    <td><code>
428
429
430
431
432
433        boolean</code>
434    </td>
435
436    <td width="100%">
437      <code>
438      equals(Object arg0)
439      </code>
440
441    </td>
442  </tr>
443
444
445
446  <tr class="api apilevel-" >
447
448
449    <td><code>
450
451
452
453
454
455        void</code>
456    </td>
457
458    <td width="100%">
459      <code>
460      finalize()
461      </code>
462
463    </td>
464  </tr>
465
466
467
468  <tr class="api apilevel-" >
469
470
471    <td><code>
472
473
474
475        final
476
477        Class&lt;?&gt;</code>
478    </td>
479
480    <td width="100%">
481      <code>
482      getClass()
483      </code>
484
485    </td>
486  </tr>
487
488
489
490  <tr class="api apilevel-" >
491
492
493    <td><code>
494
495
496
497
498
499        int</code>
500    </td>
501
502    <td width="100%">
503      <code>
504      hashCode()
505      </code>
506
507    </td>
508  </tr>
509
510
511
512  <tr class="api apilevel-" >
513
514
515    <td><code>
516
517
518
519        final
520
521        void</code>
522    </td>
523
524    <td width="100%">
525      <code>
526      notify()
527      </code>
528
529    </td>
530  </tr>
531
532
533
534  <tr class="api apilevel-" >
535
536
537    <td><code>
538
539
540
541        final
542
543        void</code>
544    </td>
545
546    <td width="100%">
547      <code>
548      notifyAll()
549      </code>
550
551    </td>
552  </tr>
553
554
555
556  <tr class="api apilevel-" >
557
558
559    <td><code>
560
561
562
563
564
565        String</code>
566    </td>
567
568    <td width="100%">
569      <code>
570      toString()
571      </code>
572
573    </td>
574  </tr>
575
576
577
578  <tr class="api apilevel-" >
579
580
581    <td><code>
582
583
584
585        final
586
587        void</code>
588    </td>
589
590    <td width="100%">
591      <code>
592      wait(long arg0, int arg1)
593      </code>
594
595    </td>
596  </tr>
597
598
599
600  <tr class="api apilevel-" >
601
602
603    <td><code>
604
605
606
607        final
608
609        void</code>
610    </td>
611
612    <td width="100%">
613      <code>
614      wait(long arg0)
615      </code>
616
617    </td>
618  </tr>
619
620
621
622  <tr class="api apilevel-" >
623
624
625    <td><code>
626
627
628
629        final
630
631        void</code>
632    </td>
633
634    <td width="100%">
635      <code>
636      wait()
637      </code>
638
639    </td>
640  </tr>
641
642
643
644    </table>
645  </div>
646</div>
647</td></tr>
648
649
650</table>
651
652
653
654<!-- XML Attributes -->
655
656
657<!-- Enum Values -->
658
659
660<!-- Constants -->
661
662
663<!-- ========= ENUM CONSTANTS DETAIL ======== -->
664<h2 class="api-section">Constants</h2>
665
666
667
668
669<A NAME="EXTRA_PEER_ID"></A>
670
671<div class="api apilevel-">
672    <h3 class="api-name">EXTRA_PEER_ID</h3>
673    <div class="api-level">
674
675
676
677
678    </div>
679<pre class="api-signature no-pretty-print">
680String EXTRA_PEER_ID</pre>
681
682
683
684
685  <p>The key for <code><a href="/reference/java/lang/String.html">String</a></code> extra specifying the ID of the currently connected device in the
686 phone-side config activity launch <code><a href="/reference/android/content/Intent.html">Intent</a></code>.
687</p>
688
689
690      <p>Constant Value:
691
692          "android.support.wearable.watchface.extra.PEER_ID"
693
694
695</div>
696
697
698
699<A NAME="EXTRA_WATCH_FACE_COMPONENT"></A>
700
701<div class="api apilevel-">
702    <h3 class="api-name">EXTRA_WATCH_FACE_COMPONENT</h3>
703    <div class="api-level">
704
705
706
707
708    </div>
709<pre class="api-signature no-pretty-print">
710String EXTRA_WATCH_FACE_COMPONENT</pre>
711
712
713
714
715  <p>The key for <code><a href="/reference/java/lang/String.html">String</a></code> extra specifying a <code><a href="/reference/android/content/ComponentName.html">ComponentName</a></code> of the
716 watch face being configured in the config activity launch <code><a href="/reference/android/content/Intent.html">Intent</a></code>.
717</p>
718
719
720      <p>Constant Value:
721
722          "android.support.wearable.watchface.extra.WATCH_FACE_COMPONENT"
723
724
725</div>
726
727
728
729
730<!-- Fields -->
731
732
733<!-- Public ctors -->
734
735
736
737<!-- ========= CONSTRUCTOR DETAIL ======== -->
738<!-- Protected ctors -->
739
740
741
742<!-- ========= METHOD DETAIL ======== -->
743<!-- Public methdos -->
744
745
746
747<!-- ========= METHOD DETAIL ======== -->
748
749
750
751<!-- ========= END OF CLASS DATA ========= -->
752
753</div><!-- end jd-content -->
754
755
756
757<div class="data-reference-resources-wrapper">
758
759  <ul data-reference-resources>
760
761
762
763    <li><h2>Classes</h2>
764      <ul>
765          <li class="selected api apilevel-"><a href="/reference/android/support/wearable/companion/WatchFaceCompanion.html">WatchFaceCompanion</a></li>
766      </ul>
767    </li>
768
769
770
771  </ul>
772
773</div>
774
775
776
777</body>
778</html>
779