• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>RemoteInputIntent</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  &#124; <a href="#pubctors">Ctors</a>
192
193
194
195
196
197
198  &#124; <a href="#inhmethods">Inherited Methods</a>
199
200&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
201
202</div><!-- end sum-details-links -->
203</div><!-- end api-info-block -->
204
205<div class="api apilevel-" id="jd-content">
206
207<!-- ======== START OF CLASS DATA ======== -->
208
209<h1 class="api-title">RemoteInputIntent</h1>
210<p>
211<code class="api-signature">
212  public
213
214
215
216  class
217  RemoteInputIntent
218</code>
219<br>
220
221
222<code class="api-signature">
223
224    extends Object
225
226
227
228</code>
229
230<code class="api-signature">
231
232
233
234</code>
235
236</p><table class="jd-inheritance-table">
237
238
239  <tr>
240
241    <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object
242    </td>
243  </tr>
244
245
246  <tr>
247
248      <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
249
250    <td colspan="1" class="jd-inheritance-class-cell">android.support.wearable.input.RemoteInputIntent
251    </td>
252  </tr>
253
254
255</table>
256
257
258
259
260<br><hr>
261
262
263  <p>Constants for supporting remote inputs through starting an <code><a href="/reference/android/content/Intent.html">Intent</a></code>.
264
265 <p>The following example prompts the user to provide input for one <code>RemoteInput</code> by
266 starting an input activity.</p>
267
268 <pre class="prettyprint">
269 public static final String KEY_QUICK_REPLY_TEXT = "quick_reply";
270 RemoteInput[] remoteInputs = new RemoteInput[] {
271     new RemoteInput.Builder(KEY_QUICK_REPLY_TEXT).setLabel("Quick reply").build()
272 };
273 Intent intent = new Intent(ACTION_REMOTE_INPUT);
274 intent.putExtra(EXTRA_REMOTE_INPUTS, remoteInputs);
275 startActivity(intent);
276 </pre>
277
278 <p>The intent returned via <code><a href="/reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent)">onActivityResult(int, int, Intent)</a></code> will contain the input results
279 if collected. To access these results, use the <code><a href="/reference/android/app/RemoteInput.html#getResultsFromIntent(android.content.Intent)">getResultsFromIntent(Intent)</a></code>
280 function. The result values will present under the result key passed to the <code><a href="/reference/android/app/RemoteInput.Builder.html">RemoteInput.Builder</a></code>
281 constructor.
282
283 <pre class="prettyprint">
284 public static final String KEY_QUICK_REPLY_TEXT = "quick_reply";
285 Bundle results = RemoteInput.getResultsFromIntent(intent);
286 if (results != null) {
287     CharSequence quickReplyResult = results.getCharSequence(KEY_QUICK_REPLY_TEXT);
288 }</pre>
289</p>
290
291
292
293
294
295
296
297<h2 class="api-section">Summary</h2>
298
299
300
301
302
303
304
305
306
307
308
309
310
311<!-- =========== ENUM CONSTANT SUMMARY =========== -->
312<table id="constants" class="responsive constants">
313<tr><th colspan="2"><h3>Constants</h3></th></tr>
314
315
316
317    <tr class="api apilevel-" >
318        <td><code>String</code></td>
319        <td width="100%">
320          <code><a href="/reference/android/support/wearable/input/RemoteInputIntent.html#ACTION_REMOTE_INPUT">ACTION_REMOTE_INPUT</a></code>
321          <p>Starts an activity that will prompt the user for inputs based on the
322 <code><a href="/reference/android/app/RemoteInput.html">RemoteInput</a></code>.
323
324
325</p>
326        </td>
327    </tr>
328
329
330    <tr class="api apilevel-" >
331        <td><code>String</code></td>
332        <td width="100%">
333          <code><a href="/reference/android/support/wearable/input/RemoteInputIntent.html#EXTRA_CANCEL_LABEL">EXTRA_CANCEL_LABEL</a></code>
334          <p>Optional string to display to cancel the action.
335
336
337</p>
338        </td>
339    </tr>
340
341
342    <tr class="api apilevel-" >
343        <td><code>String</code></td>
344        <td width="100%">
345          <code><a href="/reference/android/support/wearable/input/RemoteInputIntent.html#EXTRA_CONFIRM_LABEL">EXTRA_CONFIRM_LABEL</a></code>
346          <p>Optional string to display to confirm that the action should be executed.
347
348
349</p>
350        </td>
351    </tr>
352
353
354    <tr class="api apilevel-" >
355        <td><code>String</code></td>
356        <td width="100%">
357          <code><a href="/reference/android/support/wearable/input/RemoteInputIntent.html#EXTRA_IN_PROGRESS_LABEL">EXTRA_IN_PROGRESS_LABEL</a></code>
358          <p>Optional string to display while the wearable is preparing to automatically execute the
359 action.
360
361
362</p>
363        </td>
364    </tr>
365
366
367    <tr class="api apilevel-" >
368        <td><code>String</code></td>
369        <td width="100%">
370          <code><a href="/reference/android/support/wearable/input/RemoteInputIntent.html#EXTRA_REMOTE_INPUTS">EXTRA_REMOTE_INPUTS</a></code>
371          <p>Array of <code><a href="/reference/android/app/RemoteInput.html">RemoteInput</a></code>, to be used with <code><a href="/reference/android/support/wearable/input/RemoteInputIntent.html#ACTION_REMOTE_INPUT">ACTION_REMOTE_INPUT</a></code>, to specify
372 inputs to be collected from a user.
373
374
375</p>
376        </td>
377    </tr>
378
379
380    <tr class="api apilevel-" >
381        <td><code>String</code></td>
382        <td width="100%">
383          <code><a href="/reference/android/support/wearable/input/RemoteInputIntent.html#EXTRA_SKIP_CONFIRMATION_UI">EXTRA_SKIP_CONFIRMATION_UI</a></code>
384          <p>Optional boolean, to be used with <code><a href="/reference/android/support/wearable/input/RemoteInputIntent.html#ACTION_REMOTE_INPUT">ACTION_REMOTE_INPUT</a></code>, to indicate if a
385 confirmation screen should be displayed to the user after he entered its input.
386
387
388</p>
389        </td>
390    </tr>
391
392
393    <tr class="api apilevel-" >
394        <td><code>String</code></td>
395        <td width="100%">
396          <code><a href="/reference/android/support/wearable/input/RemoteInputIntent.html#EXTRA_TITLE">EXTRA_TITLE</a></code>
397          <p>String to display on top of the confirmation screen to describe the action like "SMS" or
398 "Email".
399
400
401</p>
402        </td>
403    </tr>
404
405
406
407</table>
408
409
410
411
412
413
414
415
416
417
418
419
420<!-- ======== CONSTRUCTOR SUMMARY ======== -->
421<table id="pubctors" class="responsive constructors">
422<tr><th colspan="2"><h3>Public constructors</h3></th></tr>
423
424
425
426
427  <tr class="api apilevel-" >
428
429
430    <td width="100%">
431      <code>
432      <a href="/reference/android/support/wearable/input/RemoteInputIntent.html#RemoteInputIntent()">RemoteInputIntent</a>()
433      </code>
434
435    </td>
436  </tr>
437
438
439
440</table>
441
442
443
444
445
446
447
448
449
450
451
452<!-- ========== METHOD SUMMARY =========== -->
453<table id="inhmethods" class="methods inhtable">
454<tr><th><h3>Inherited methods</h3></th></tr>
455
456
457<tr class="api apilevel-" >
458<td colspan="2">
459
460  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
461          ><img height="34" id="inherited-methods-java.lang.Object-trigger"
462          src="/assets/images/styles/disclosure_down.png"
463          class="jd-expando-trigger-img" /></a>From
464class
465<code>
466
467    java.lang.Object
468
469</code>
470<div id="inherited-methods-java.lang.Object">
471  <div id="inherited-methods-java.lang.Object-list"
472        class="jd-inheritedlinks">
473  </div>
474  <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
475    <table class="jd-sumtable-expando responsive">
476
477
478
479
480  <tr class="api apilevel-" >
481
482
483    <td><code>
484
485
486
487
488
489        Object</code>
490    </td>
491
492    <td width="100%">
493      <code>
494      clone()
495      </code>
496
497    </td>
498  </tr>
499
500
501
502  <tr class="api apilevel-" >
503
504
505    <td><code>
506
507
508
509
510
511        boolean</code>
512    </td>
513
514    <td width="100%">
515      <code>
516      equals(Object arg0)
517      </code>
518
519    </td>
520  </tr>
521
522
523
524  <tr class="api apilevel-" >
525
526
527    <td><code>
528
529
530
531
532
533        void</code>
534    </td>
535
536    <td width="100%">
537      <code>
538      finalize()
539      </code>
540
541    </td>
542  </tr>
543
544
545
546  <tr class="api apilevel-" >
547
548
549    <td><code>
550
551
552
553        final
554
555        Class&lt;?&gt;</code>
556    </td>
557
558    <td width="100%">
559      <code>
560      getClass()
561      </code>
562
563    </td>
564  </tr>
565
566
567
568  <tr class="api apilevel-" >
569
570
571    <td><code>
572
573
574
575
576
577        int</code>
578    </td>
579
580    <td width="100%">
581      <code>
582      hashCode()
583      </code>
584
585    </td>
586  </tr>
587
588
589
590  <tr class="api apilevel-" >
591
592
593    <td><code>
594
595
596
597        final
598
599        void</code>
600    </td>
601
602    <td width="100%">
603      <code>
604      notify()
605      </code>
606
607    </td>
608  </tr>
609
610
611
612  <tr class="api apilevel-" >
613
614
615    <td><code>
616
617
618
619        final
620
621        void</code>
622    </td>
623
624    <td width="100%">
625      <code>
626      notifyAll()
627      </code>
628
629    </td>
630  </tr>
631
632
633
634  <tr class="api apilevel-" >
635
636
637    <td><code>
638
639
640
641
642
643        String</code>
644    </td>
645
646    <td width="100%">
647      <code>
648      toString()
649      </code>
650
651    </td>
652  </tr>
653
654
655
656  <tr class="api apilevel-" >
657
658
659    <td><code>
660
661
662
663        final
664
665        void</code>
666    </td>
667
668    <td width="100%">
669      <code>
670      wait(long arg0, int arg1)
671      </code>
672
673    </td>
674  </tr>
675
676
677
678  <tr class="api apilevel-" >
679
680
681    <td><code>
682
683
684
685        final
686
687        void</code>
688    </td>
689
690    <td width="100%">
691      <code>
692      wait(long arg0)
693      </code>
694
695    </td>
696  </tr>
697
698
699
700  <tr class="api apilevel-" >
701
702
703    <td><code>
704
705
706
707        final
708
709        void</code>
710    </td>
711
712    <td width="100%">
713      <code>
714      wait()
715      </code>
716
717    </td>
718  </tr>
719
720
721
722    </table>
723  </div>
724</div>
725</td></tr>
726
727
728</table>
729
730
731
732<!-- XML Attributes -->
733
734
735<!-- Enum Values -->
736
737
738<!-- Constants -->
739
740
741<!-- ========= ENUM CONSTANTS DETAIL ======== -->
742<h2 class="api-section">Constants</h2>
743
744
745
746
747<A NAME="ACTION_REMOTE_INPUT"></A>
748
749<div class="api apilevel-">
750    <h3 class="api-name">ACTION_REMOTE_INPUT</h3>
751    <div class="api-level">
752
753
754
755
756    </div>
757<pre class="api-signature no-pretty-print">
758String ACTION_REMOTE_INPUT</pre>
759
760
761
762
763  <p>Starts an activity that will prompt the user for inputs based on the
764 <code><a href="/reference/android/app/RemoteInput.html">RemoteInput</a></code>. The results will be returned via activity results (in
765 <code><a href="/reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent)">onActivityResult(int, int, Intent)</a></code>. To retrieve the user's inputs,
766 <code><a href="/reference/android/app/RemoteInput.html#getResultsFromIntent(android.content.Intent)">getResultsFromIntent(Intent)</a></code> should be called to get a bundle containing a
767 key/value for every result key populated by remote input collector.
768 <p>When using this action, the extra <code><a href="/reference/android/support/wearable/input/RemoteInputIntent.html#EXTRA_REMOTE_INPUTS">EXTRA_REMOTE_INPUTS</a></code> should be populated with
769 an array of <code><a href="/reference/android/app/RemoteInput.html">RemoteInput</a></code>.</p>
770</p>
771
772
773      <p>Constant Value:
774
775          "android.support.wearable.input.action.REMOTE_INPUT"
776
777
778</div>
779
780
781
782<A NAME="EXTRA_CANCEL_LABEL"></A>
783
784<div class="api apilevel-">
785    <h3 class="api-name">EXTRA_CANCEL_LABEL</h3>
786    <div class="api-level">
787
788
789
790
791    </div>
792<pre class="api-signature no-pretty-print">
793String EXTRA_CANCEL_LABEL</pre>
794
795
796
797
798  <p>Optional string to display to cancel the action. This is usually an imperative verb,
799 like "Cancel". Defaults to Cancel.
800</p>
801
802
803      <p>Constant Value:
804
805          "android.support.wearable.input.extra.CANCEL_LABEL"
806
807
808</div>
809
810
811
812<A NAME="EXTRA_CONFIRM_LABEL"></A>
813
814<div class="api apilevel-">
815    <h3 class="api-name">EXTRA_CONFIRM_LABEL</h3>
816    <div class="api-level">
817
818
819
820
821    </div>
822<pre class="api-signature no-pretty-print">
823String EXTRA_CONFIRM_LABEL</pre>
824
825
826
827
828  <p>Optional string to display to confirm that the action should be executed. This is usually
829 an imperative verb like "Send". Defaults to "Send".
830</p>
831
832
833      <p>Constant Value:
834
835          "android.support.wearable.input.extra.CONFIRM_LABEL"
836
837
838</div>
839
840
841
842<A NAME="EXTRA_IN_PROGRESS_LABEL"></A>
843
844<div class="api apilevel-">
845    <h3 class="api-name">EXTRA_IN_PROGRESS_LABEL</h3>
846    <div class="api-level">
847
848
849
850
851    </div>
852<pre class="api-signature no-pretty-print">
853String EXTRA_IN_PROGRESS_LABEL</pre>
854
855
856
857
858  <p>Optional string to display while the wearable is preparing to automatically execute the
859 action. This is usually a 'ing' verb ending in ellipsis like "Sending...". Defaults to
860 "Sending...".
861</p>
862
863
864      <p>Constant Value:
865
866          "android.support.wearable.input.extra.IN_PROGRESS_LABEL"
867
868
869</div>
870
871
872
873<A NAME="EXTRA_REMOTE_INPUTS"></A>
874
875<div class="api apilevel-">
876    <h3 class="api-name">EXTRA_REMOTE_INPUTS</h3>
877    <div class="api-level">
878
879
880
881
882    </div>
883<pre class="api-signature no-pretty-print">
884String EXTRA_REMOTE_INPUTS</pre>
885
886
887
888
889  <p>Array of <code><a href="/reference/android/app/RemoteInput.html">RemoteInput</a></code>, to be used with <code><a href="/reference/android/support/wearable/input/RemoteInputIntent.html#ACTION_REMOTE_INPUT">ACTION_REMOTE_INPUT</a></code>, to specify
890 inputs to be collected from a user.
891</p>
892
893
894      <p>Constant Value:
895
896          "android.support.wearable.input.extra.REMOTE_INPUTS"
897
898
899</div>
900
901
902
903<A NAME="EXTRA_SKIP_CONFIRMATION_UI"></A>
904
905<div class="api apilevel-">
906    <h3 class="api-name">EXTRA_SKIP_CONFIRMATION_UI</h3>
907    <div class="api-level">
908
909
910
911
912    </div>
913<pre class="api-signature no-pretty-print">
914String EXTRA_SKIP_CONFIRMATION_UI</pre>
915
916
917
918
919  <p>Optional boolean, to be used with <code><a href="/reference/android/support/wearable/input/RemoteInputIntent.html#ACTION_REMOTE_INPUT">ACTION_REMOTE_INPUT</a></code>, to indicate if a
920 confirmation screen should be displayed to the user after he entered its input.
921 The defaults is true, meaning that a confirmation screen will be displayed to the user
922 before results are returned via activity results.
923</p>
924
925
926      <p>Constant Value:
927
928          "android.support.wearable.input.extra.SKIP_CONFIRMATION_UI"
929
930
931</div>
932
933
934
935<A NAME="EXTRA_TITLE"></A>
936
937<div class="api apilevel-">
938    <h3 class="api-name">EXTRA_TITLE</h3>
939    <div class="api-level">
940
941
942
943
944    </div>
945<pre class="api-signature no-pretty-print">
946String EXTRA_TITLE</pre>
947
948
949
950
951  <p>String to display on top of the confirmation screen to describe the action like "SMS" or
952 "Email".
953</p>
954
955
956      <p>Constant Value:
957
958          "android.support.wearable.input.extra.TITLE"
959
960
961</div>
962
963
964
965
966<!-- Fields -->
967
968
969<!-- Public ctors -->
970
971
972<!-- ========= CONSTRUCTOR DETAIL ======== -->
973<h2 class="api-section">Public constructors</h2>
974
975
976
977<A NAME="RemoteInputIntent()"></A>
978
979<div class="api apilevel-">
980    <h3 class="api-name">RemoteInputIntent</h3>
981    <div class="api-level">
982      <div></div>
983
984
985
986    </div>
987<pre class="api-signature no-pretty-print">
988RemoteInputIntent ()</pre>
989
990
991
992
993  <p></p>
994
995</div>
996
997
998
999
1000
1001<!-- ========= CONSTRUCTOR DETAIL ======== -->
1002<!-- Protected ctors -->
1003
1004
1005
1006<!-- ========= METHOD DETAIL ======== -->
1007<!-- Public methdos -->
1008
1009
1010
1011<!-- ========= METHOD DETAIL ======== -->
1012
1013
1014
1015<!-- ========= END OF CLASS DATA ========= -->
1016
1017</div><!-- end jd-content -->
1018
1019
1020
1021<div class="data-reference-resources-wrapper">
1022
1023  <ul data-reference-resources>
1024
1025
1026
1027    <li><h2>Classes</h2>
1028      <ul>
1029          <li class="api apilevel-"><a href="/reference/android/support/wearable/input/RemoteInputConstants.html">RemoteInputConstants</a></li>
1030          <li class="selected api apilevel-"><a href="/reference/android/support/wearable/input/RemoteInputIntent.html">RemoteInputIntent</a></li>
1031      </ul>
1032    </li>
1033
1034
1035
1036  </ul>
1037
1038</div>
1039
1040
1041
1042</body>
1043</html>
1044