1<!DOCTYPE html>
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<html>
100<head>
101
102
103<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
104<meta name="viewport" content="width=device-width" />
105
106<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
107<title>Room | Android Developers</title>
108
109<!-- STYLESHEETS -->
110<link rel="stylesheet"
111href="//fonts.googleapis.com/css?family=Roboto+Condensed">
112<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold"
113  title="roboto">
114<link href="/assets/css/default.css?v=4" rel="stylesheet" type="text/css">
115
116
117
118<!-- JAVASCRIPT -->
119<script src="//www.google.com/jsapi" type="text/javascript"></script>
120<script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script>
121<script type="text/javascript">
122  var toRoot = "/";
123  var metaTags = [];
124  var devsite = false;
125</script>
126<script src="/assets/js/docs.js?v=3" type="text/javascript"></script>
127
128
129
130<script>
131  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
132  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
133  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
134  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
135
136  ga('create', 'UA-5831155-1', 'android.com');
137  ga('create', 'UA-49880327-2', 'android.com', {'name': 'universal'});  // New tracker);
138  ga('send', 'pageview');
139  ga('universal.send', 'pageview'); // Send page view for new tracker.
140</script>
141
142</head>
143
144<body class="gc-documentation google
145  develop reference" itemscope itemtype="http://schema.org/Article">
146  <div id="doc-api-level" class="" style="display:none"></div>
147  <a name="top"></a>
148
149
150<a name="top"></a>
151
152<!-- dialog to prompt lang pref change when loaded from hardcoded URL
153<div id="langMessage" style="display:none">
154  <div>
155    <div class="lang en">
156      <p>You requested a page in English, would you like to proceed with this language setting?</p>
157    </div>
158    <div class="lang es">
159      <p>You requested a page in Spanish (Español), would you like to proceed with this language setting?</p>
160    </div>
161    <div class="lang ja">
162      <p>You requested a page in Japanese (日本語), would you like to proceed with this language setting?</p>
163    </div>
164    <div class="lang ko">
165      <p>You requested a page in Korean (한국어), would you like to proceed with this language setting?</p>
166    </div>
167    <div class="lang ru">
168      <p>You requested a page in Russian (Русский), would you like to proceed with this language setting?</p>
169    </div>
170    <div class="lang zh-cn">
171      <p>You requested a page in Simplified Chinese (简体中文), would you like to proceed with this language setting?</p>
172    </div>
173    <div class="lang zh-tw">
174      <p>You requested a page in Traditional Chinese (繁體中文), would you like to proceed with this language setting?</p>
175    </div>
176    <a href="#" class="button yes" onclick="return false;">
177      <span class="lang en">Yes</span>
178      <span class="lang es">Sí</span>
179      <span class="lang ja">Yes</span>
180      <span class="lang ko">Yes</span>
181      <span class="lang ru">Yes</span>
182      <span class="lang zh-cn">是的</span>
183      <span class="lang zh-tw">没有</span>
184    </a>
185    <a href="#" class="button" onclick="$('#langMessage').hide();return false;">
186      <span class="lang en">No</span>
187      <span class="lang es">No</span>
188      <span class="lang ja">No</span>
189      <span class="lang ko">No</span>
190      <span class="lang ru">No</span>
191      <span class="lang zh-cn">没有</span>
192      <span class="lang zh-tw">没有</span>
193    </a>
194  </div>
195</div> -->
196
197
198  <!-- Header -->
199  <div id="header-wrapper">
200    <div id="header">
201
202
203
204
205      <div class="wrap" id="header-wrap">
206        <div class="col-3 logo">
207          <a href="/index.html">
208            <img src="/assets/images/dac_logo.png"
209                srcset="/assets/images/dac_logo@2x.png 2x"
210                width="123" height="25" alt="Android Developers" />
211          </a>
212          <div class="btn-quicknav" id="btn-quicknav">
213            <a href="#" class="arrow-inactive">Quicknav</a>
214            <a href="#" class="arrow-active">Quicknav</a>
215          </div>
216        </div>
217        <ul class="nav-x col-9">
218            <li class="design">
219              <a href="/design/index.html"
220              zh-tw-lang="設計"
221              zh-cn-lang="设计"
222              ru-lang="Проектирование"
223              ko-lang="디자인"
224              ja-lang="設計"
225              es-lang="Diseñar"
226              >Design</a></li>
227            <li class="develop"><a href="/develop/index.html"
228              zh-tw-lang="開發"
229              zh-cn-lang="开发"
230              ru-lang="Разработка"
231              ko-lang="개발"
232              ja-lang="開発"
233              es-lang="Desarrollar"
234              >Develop</a></li>
235            <li class="distribute last"><a href="/distribute/index.html"
236              zh-tw-lang="發佈"
237              zh-cn-lang="分发"
238              ru-lang="Распространение"
239              ko-lang="배포"
240              ja-lang="配布"
241              es-lang="Distribuir"
242              >Distribute</a></li>
243        </ul>
244
245
246
247
248<div class="menu-container">
249  <div class="moremenu">
250    <div id="more-btn"></div>
251  </div>
252  <div class="morehover" id="moremenu">
253    <div class="top"></div>
254    <div class="mid">
255      <div class="header">Links</div>
256      <ul>
257        <li><a href="https://play.google.com/apps/publish/" target="_googleplay">Google Play Developer Console</a></li>
258        <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
259        <li><a href="/about/index.html">About Android</a></li>
260      </ul>
261      <div class="header">Android Sites</div>
262      <ul>
263        <li><a href="http://www.android.com">Android.com</a></li>
264        <li class="active"><a>Android Developers</a></li>
265        <li><a href="http://source.android.com">Android Open Source Project</a></li>
266      </ul>
267
268
269
270        <div class="header">Language</div>
271          <div id="language" class="locales">
272            <select name="language" onChange="changeLangPref(this.value, true)">
273                <option value="en">English</option>
274                <option value="es">Español</option>
275                <option value="ja">日本語</option>
276                <option value="ko">한국어</option>
277                <option value="ru">Русский</option>
278                <option value="zh-cn">中文(简体)</option>
279                <option value="zh-tw">中文(繁體)</option>
280            </select>
281          </div>
282        <script type="text/javascript">
283          <!--
284          loadLangPref();
285            //-->
286        </script>
287
288
289      <br class="clearfix" />
290    </div><!-- end 'mid' -->
291    <div class="bottom"></div>
292  </div><!-- end 'moremenu' -->
293
294  <div class="search" id="search-container">
295    <div class="search-inner">
296      <div id="search-btn"></div>
297      <div class="left"></div>
298      <form onsubmit="return submit_search()">
299        <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
300          onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
301          onkeydown="return search_changed(event, true, '/')"
302          onkeyup="return search_changed(event, false, '/')" />
303      </form>
304      <div class="right"></div>
305      <a class="close hide">close</a>
306      <div class="left"></div>
307      <div class="right"></div>
308    </div><!-- end search-inner -->
309  </div><!-- end search-container -->
310
311  <div class="search_filtered_wrapper reference">
312    <div class="suggest-card reference no-display">
313      <ul class="search_filtered">
314      </ul>
315    </div>
316  </div>
317
318  <div class="search_filtered_wrapper docs">
319    <div class="suggest-card dummy no-display">&nbsp;</div>
320    <div class="suggest-card develop no-display">
321      <ul class="search_filtered">
322      </ul>
323      <div class="child-card guides no-display">
324      </div>
325      <div class="child-card training no-display">
326      </div>
327      <div class="child-card samples no-display">
328      </div>
329    </div>
330    <div class="suggest-card design no-display">
331      <ul class="search_filtered">
332      </ul>
333    </div>
334    <div class="suggest-card distribute no-display">
335      <ul class="search_filtered">
336      </ul>
337    </div>
338  </div>
339</div><!-- end menu-container (search and menu widget) -->
340
341
342
343        <!-- Expanded quicknav -->
344        <div id="quicknav" class="col-13">
345          <ul>
346            <li class="about">
347              <ul>
348                <li><a href="/about/index.html">About</a></li>
349                <li><a href="/wear/index.html">Wear</a></li>
350                <li><a href="/tv/index.html">TV</a></li>
351                <li><a href="/auto/index.html">Auto</a></li>
352              </ul>
353            </li>
354            <li class="design">
355              <ul>
356                <li><a href="/design/index.html">Get Started</a></li>
357                <li><a href="/design/devices.html">Devices</a></li>
358                <li><a href="/design/style/index.html">Style</a></li>
359                <li><a href="/design/patterns/index.html">Patterns</a></li>
360                <li><a href="/design/building-blocks/index.html">Building Blocks</a></li>
361                <li><a href="/design/downloads/index.html">Downloads</a></li>
362                <li><a href="/design/videos/index.html">Videos</a></li>
363              </ul>
364            </li>
365            <li class="develop">
366              <ul>
367                <li><a href="/training/index.html"
368                  zh-tw-lang="訓練課程"
369                  zh-cn-lang="培训"
370                  ru-lang="Курсы"
371                  ko-lang="교육"
372                  ja-lang="トレーニング"
373                  es-lang="Capacitación"
374                  >Training</a></li>
375                <li><a href="/guide/index.html"
376                  zh-tw-lang="API 指南"
377                  zh-cn-lang="API 指南"
378                  ru-lang="Руководства по API"
379                  ko-lang="API 가이드"
380                  ja-lang="API ガイド"
381                  es-lang="Guías de la API"
382                  >API Guides</a></li>
383                <li><a href="/reference/packages.html"
384                  zh-tw-lang="參考資源"
385                  zh-cn-lang="参考"
386                  ru-lang="Справочник"
387                  ko-lang="참조문서"
388                  ja-lang="リファレンス"
389                  es-lang="Referencia"
390                  >Reference</a></li>
391                <li><a href="/sdk/index.html"
392                  zh-tw-lang="相關工具"
393                  zh-cn-lang="工具"
394                  ru-lang="Инструменты"
395                  ko-lang="도구"
396                  ja-lang="ツール"
397                  es-lang="Herramientas"
398                  >Tools</a>
399                </li>
400                <li><a href="/google/index.html">Google Services</a>
401                </li>
402
403                  <li><a href="/samples/index.html">Samples</a>
404                  </li>
405
406              </ul>
407            </li>
408            <li class="distribute last">
409              <ul>
410                <li><a href="/distribute/googleplay/index.html">Google Play</a></li>
411                <li><a href="/distribute/essentials/index.html">Essentials</a></li>
412                <li><a href="/distribute/users/index.html">Get Users</a></li>
413                <li><a href="/distribute/engage/index.html">Engage &amp; Retain</a></li>
414                <li><a href="/distribute/monetize/index.html">Monetize</a></li>
415                <li><a href="/distribute/tools/index.html">Tools &amp; Reference</a></li>
416                <li><a href="/distribute/stories/index.html">Developer Stories</a></li>
417              </ul>
418            </li>
419          </ul>
420        </div><!-- /Expanded quicknav -->
421      </div><!-- end header-wrap.wrap -->
422    </div><!-- end header -->
423
424
425    <!-- Secondary x-nav -->
426    <div id="nav-x">
427        <div class="wrap" style="position:relative;z-index:1">
428
429
430
431
432
433            <ul class="nav-x col-9 develop" style="width:100%">
434                <li class="training"><a href="/training/index.html"
435                  zh-tw-lang="訓練課程"
436                  zh-cn-lang="培训"
437                  ru-lang="Курсы"
438                  ko-lang="교육"
439                  ja-lang="トレーニング"
440                  es-lang="Capacitación"
441                  >Training</a></li>
442                <li class="guide"><a href="/guide/index.html"
443                  zh-tw-lang="API 指南"
444                  zh-cn-lang="API 指南"
445                  ru-lang="Руководства по API"
446                  ko-lang="API 가이드"
447                  ja-lang="API ガイド"
448                  es-lang="Guías de la API"
449                  >API Guides</a></li>
450                <li class="reference"><a href="/reference/packages.html"
451                  zh-tw-lang="參考資源"
452                  zh-cn-lang="参考"
453                  ru-lang="Справочник"
454                  ko-lang="참조문서"
455                  ja-lang="リファレンス"
456                  es-lang="Referencia"
457                  >Reference</a></li>
458                <li class="tools"><a href="/sdk/index.html"
459                  zh-tw-lang="相關工具"
460                  zh-cn-lang="工具"
461                  ru-lang="Инструменты"
462                  ko-lang="도구"
463                  ja-lang="ツール"
464                  es-lang="Herramientas"
465                  >Tools</a></li>
466                <li class="google"><a href="/google/index.html"
467                  >Google Services</a>
468                </li>
469
470                  <li class="samples"><a href="/samples/index.html"
471                    >Samples</a>
472                  </li>
473
474            </ul>
475        </div>
476    </div>
477    <!-- /Sendondary x-nav DEVELOP -->
478
479
480
481    <div id="searchResults" class="wrap" style="display:none;">
482      <h2 id="searchTitle">Results</h2>
483      <div id="leftSearchControl" class="search-control">Loading...</div>
484    </div>
485  </div> <!--end header-wrapper -->
486
487  <div id="sticky-header">
488    <div>
489      <a class="logo" href="#top"></a>
490      <a class="top" href="#top"></a>
491      <ul class="breadcrumb">
492
493        <li class="current">Room</li>
494      </ul>
495    </div>
496  </div>
497
498
499
500
501
502
503  <div class="wrap clearfix" id="body-content">
504    <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
505      <div id="devdoc-nav" class="scroll-pane">
506
507
508
509<ul id="nav">
510
511  <li class="nav-section">
512    <div class="nav-section-header empty"><a href="/google/index.html">
513          <span class="en">Overview</span>
514      </a></div>
515  </li>
516
517  <li class="nav-section">
518    <div class="nav-section-header empty"><a href="/google/play-services/games.html">
519          <span class="en">Games</span>
520      </a></div>
521  </li>
522  <li class="nav-section">
523    <div class="nav-section-header empty"><a href="/google/play-services/location.html">
524          <span class="en">Location</span>
525      </a></div>
526  </li>
527  <li class="nav-section">
528    <div class="nav-section-header empty"><a href="/google/play-services/plus.html">
529          <span class="en">Google+</span>
530                </a></div>
531  </li>
532  <li class="nav-section">
533    <div class="nav-section-header empty"><a href="/google/play-services/maps.html">
534          <span class="en">Maps</span>
535      </a></div>
536  </li>
537  <li class="nav-section">
538    <div class="nav-section-header empty"><a href="/google/play-services/drive.html">
539          <span class="en">Drive</span>
540      </a></div>
541  </li>
542  <li class="nav-section">
543    <div class="nav-section-header empty"><a href="/google/play-services/cast.html">
544          <span class="en">Cast</span>
545      </a></div>
546  </li>
547  <li class="nav-section">
548    <div class="nav-section-header"><a href="/google/play-services/ads.html">
549      <span class="en">Ads</span></a>
550    </div>
551    <ul>
552      <li><a href="/google/play-services/id.html">
553          <span class="en">Advertising ID</span></a>
554      </li>
555    </ul>
556  </li>
557  <li class="nav-section">
558    <div class="nav-section-header empty"><a href="/google/play-services/wallet.html">
559          <span class="en">Wallet</span>
560      </a></div>
561  </li>
562
563
564  <li class="nav-section">
565    <div class="nav-section-header"><a href="/google/play-services/index.html">
566      <span class="en">Google Play Services</span></a>
567    </div>
568    <ul>
569      <li><a href="/google/play-services/setup.html">
570          <span class="en">Setting Up Google Play Services</span></a>
571      </li>
572      <li class="nav-section">
573        <div class="nav-section-header"><a href="/google/auth/api-client.html">
574          <span class="en">Accessing Google APIs</span></a>
575        </div>
576        <ul>
577          <li>
578            <a href="/google/auth/http-auth.html">
579              <span class="en">Authorizing with Google for REST APIs</span>
580            </a>
581          </li>
582        </ul>
583      </li>
584      <li id="gms-tree-list" class="nav-section">
585        <div class="nav-section-header">
586          <a href="/reference/gms-packages.html">
587            <span class="en">Reference</span>
588          </a>
589        <div>
590      </li>
591    </ul>
592  </li>
593
594
595  <li class="nav-section">
596    <div class="nav-section-header"><a href="/google/play/billing/index.html">
597      <span class="en">Google Play In-app Billing</span></a>
598    </div>
599    <ul>
600      <li><a href="/google/play/billing/billing_overview.html">
601              <span class="en">Overview</span></a>
602      </li>
603      <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html">
604              <span class="en">Version 3 API</span></a></div>
605              <ul>
606              <li><a href="/google/play/billing/billing_integrate.html">
607              <span class="en">Implementing the API</span></a></li>
608              <li><a href="/google/play/billing/billing_reference.html">
609              <span class="en">Reference</span></a></li>
610              </ul>
611      </li>
612      <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html">
613              <span class="en">Version 2 API</span></a></div>
614              <ul>
615              <li><a href="/google/play/billing/v2/billing_integrate.html">
616              <span class="en">Implementing the API</span></a></li>
617              <li><a href="/google/play/billing/v2/billing_subscriptions.html">
618              <span class="en">Subscriptions</span></a></li>
619              <li><a href="/google/play/billing/v2/billing_reference.html">
620              <span class="en">Reference</span></a></li>
621              </ul>
622      </li>
623      <li><a href="/google/play/billing/billing_subscriptions.html">
624              <span class="en">Subscriptions</span></a>
625      </li>
626      <li><a href="/google/play/billing/billing_best_practices.html">
627              <span class="en">Security and Design</span></a>
628      </li>
629      <li><a href="/google/play/billing/billing_testing.html">
630              <span class="en">Testing In-app Billing</span></a>
631      </li>
632      <li><a href="/google/play/billing/billing_admin.html">
633              <span class="en">Administering In-app Billing</span></a>
634      </li>
635      <li><a href="/google/play/billing/versions.html">
636              <span class="en">Version Notes</span></a>
637      </li>
638    </ul>
639  </li>
640
641
642
643   <li class="nav-section">
644      <div class="nav-section-header"><a href="/google/gcm/index.html">
645        <span class="en">Google Cloud Messaging</span></a>
646      </div>
647      <ul>
648        <li><a href="/google/gcm/gcm.html">
649            <span class="en">Overview</span></a>
650        </li>
651        <li><a href="/google/gcm/gs.html">
652            <span class="en">Getting Started</span></a>
653        </li>
654        <li><a href="/google/gcm/client.html">
655            <span class="en">Implementing GCM Client</span></a>
656        </li>
657        <li class="nav-section"><div class="nav-section-header"><a href="/google/gcm/server.html">
658              <span class="en">Implementing GCM Server</span></a></div>
659              <ul>
660              <li><a href="/google/gcm/ccs.html">
661              <span class="en">CCS (XMPP)</span></a></li>
662              <li><a href="/google/gcm/http.html">
663              <span class="en">HTTP</span></a></li>
664              </ul>
665        </li>
666        <li><a href="/google/gcm/notifications.html">
667              <span class="en">User Notifications</span></a>
668        </li>
669        <li><a href="/google/gcm/adv.html">
670            <span class="en">Advanced Topics</span></a>
671        </li>
672        <li><a href="/google/gcm/c2dm.html">
673            <span class="en">Migration</span></a>
674        </li>
675        <li id="gcm-tree-list" class="nav-section">
676          <div class="nav-section-header">
677            <a href="/reference/gcm-packages.html">
678              <span class="en">Reference</span>
679            </a>
680          <div>
681        </li>
682      </ul>
683  </li>
684
685  <li class="nav-section">
686  <div class="nav-section-header empty"><a href="/google/gcs/index.html">
687        <span class="en">Google Cloud Save</span></a>
688      </div>
689  </li>
690
691  <li class="nav-section">
692    <div class="nav-section-header"><a href="/google/play/dist.html">
693      <span class="en">Google Play Distribution</span></a>
694    </div>
695    <ul>
696      <li><a href="/google/play/filters.html">
697          <span class="en">Filters on Google Play</span></a>
698      </li>
699      <li><a href="/google/play/billing/gp-purchase-status-api.html">
700              <span class="en">Google Play Developer API</span></a>
701      </li>
702      <li><a href="/google/play/publishing/multiple-apks.html">
703          <span class="en">Multiple APK Support</span></a>
704      </li>
705      <li><a href="/google/play/expansion-files.html">
706          <span class="en">APK Expansion Files</span></a>
707      </li>
708      <li class="nav-section">
709        <div class="nav-section-header"><a href="/google/play/licensing/index.html">
710          <span class="en">Application Licensing</span></a>
711        </div>
712        <ul>
713          <li><a href="/google/play/licensing/overview.html">
714              <span class="en">Licensing Overview</span></a>
715          </li>
716          <li><a href="/google/play/licensing/setting-up.html">
717              <span class="en">Setting Up for Licensing</span></a>
718          </li>
719          <li><a href="/google/play/licensing/adding-licensing.html">
720              <span class="en">Adding Licensing to Your App</span></a>
721          </li>
722          <li><a href="/google/play/licensing/licensing-reference.html">
723              <span class="en">Licensing Reference</span></a>
724          </li>
725        </ul>
726      </li>
727
728  <li class="nav-section">
729    <div class="nav-section-header"><a href="/google/backup/index.html">
730      Android Backup Service</a>
731    </div>
732    <ul>
733      <li><a href="/google/backup/signup.html">
734          Register</a>
735      </li>
736    </ul>
737  </li>
738
739  </ul>
740
741</li>
742
743
744
745</ul>
746
747<script type="text/javascript">
748<!--
749    buildToggleLists();
750    changeNavLang(getLangPref());
751//-->
752</script>
753
754
755
756
757      </div>
758      <script type="text/javascript">
759       showGoogleRefTree();
760
761      </script>
762    </div> <!-- end side-nav -->
763    <script>
764      $(document).ready(function() {
765        scrollIntoView("devdoc-nav");
766        });
767    </script>
768
769
770
771
772
773
774<div class="col-12"  id="doc-col">
775
776<div id="api-info-block">
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804<div class="sum-details-links">
805
806Summary:
807
808
809
810
811
812  <a href="#constants">Constants</a>
813
814
815
816  &#124; <a href="#inhconstants">Inherited Constants</a>
817
818
819
820
821
822
823
824  &#124; <a href="#pubmethods">Methods</a>
825
826
827
828
829  &#124; <a href="#inhmethods">Inherited Methods</a>
830
831&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
832
833</div><!-- end sum-details-links -->
834<div class="api-level">
835
836
837
838
839</div>
840</div><!-- end api-info-block -->
841
842
843<!-- ======== START OF CLASS DATA ======== -->
844
845<div id="jd-header">
846    public
847
848
849
850    interface
851<h1 itemprop="name">Room</h1>
852
853
854
855
856
857      implements
858
859        Parcelable
860
861        <a href="/reference/com/google/android/gms/common/data/Freezable.html">Freezable</a>&lt;T&gt;
862
863        <a href="/reference/com/google/android/gms/games/multiplayer/Participatable.html">Participatable</a>
864
865
866
867
868
869
870
871
872</div><!-- end header -->
873
874<div id="naMessage"></div>
875
876<div id="jd-content" class="api apilevel-">
877<table class="jd-inheritance-table">
878
879
880    <tr>
881
882        <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gms.games.multiplayer.realtime.Room</td>
883    </tr>
884
885
886</table>
887
888
889
890
891
892
893<table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;">
894
895  <a href="#" onclick="return toggleInherited(this, null)" id="subclasses-indirect" class="jd-expando-trigger closed"
896          ><img id="subclasses-indirect-trigger"
897          src="/assets/images/triangle-closed.png"
898          class="jd-expando-trigger-img" /></a>Known Indirect Subclasses
899
900  <div id="subclasses-indirect">
901      <div id="subclasses-indirect-list"
902              class="jd-inheritedlinks"
903
904              >
905
906
907              <a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomEntity.html">RoomEntity</a>
908
909
910      </div>
911      <div id="subclasses-indirect-summary"
912              style="display: none;"
913              >
914
915  <table class="jd-sumtable-expando">
916
917      <tr class="alt-color api apilevel-" >
918        <td class="jd-linkcol"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomEntity.html">RoomEntity</a></td>
919        <td class="jd-descrcol" width="100%">
920          Data object representing the data for a room.&nbsp;
921
922
923
924        </td>
925      </tr>
926
927
928  </table>
929
930      </div>
931  </div>
932</td></tr></table>
933
934
935<div class="jd-descr">
936
937
938<h2>Class Overview</h2>
939<p itemprop="articleBody">Data interface for room functionality.
940</p>
941
942
943
944
945
946</div><!-- jd-descr -->
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963<div class="jd-descr">
964
965
966<h2>Summary</h2>
967
968
969
970
971
972
973
974
975
976
977
978
979
980<!-- =========== ENUM CONSTANT SUMMARY =========== -->
981<table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr>
982
983
984
985    <tr class="alt-color api apilevel-" >
986        <td class="jd-typecol">int</td>
987        <td class="jd-linkcol"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#ROOM_STATUS_ACTIVE">ROOM_STATUS_ACTIVE</a></td>
988        <td class="jd-descrcol" width="100%">
989          Constant returned by <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getStatus()">getStatus()</a></code> indicating that the room is active and connections
990 are established.
991
992
993
994        </td>
995    </tr>
996
997
998    <tr class=" api apilevel-" >
999        <td class="jd-typecol">int</td>
1000        <td class="jd-linkcol"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#ROOM_STATUS_AUTO_MATCHING">ROOM_STATUS_AUTO_MATCHING</a></td>
1001        <td class="jd-descrcol" width="100%">
1002          Constant returned by <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getStatus()">getStatus()</a></code> indicating that one or more slots are waiting to be
1003 filled by auto-matching.
1004
1005
1006
1007        </td>
1008    </tr>
1009
1010
1011    <tr class="alt-color api apilevel-" >
1012        <td class="jd-typecol">int</td>
1013        <td class="jd-linkcol"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#ROOM_STATUS_CONNECTING">ROOM_STATUS_CONNECTING</a></td>
1014        <td class="jd-descrcol" width="100%">
1015          Constant returned by <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getStatus()">getStatus()</a></code> indicating that this room is waiting for clients to
1016 connect to each other.
1017
1018
1019
1020        </td>
1021    </tr>
1022
1023
1024    <tr class=" api apilevel-" >
1025        <td class="jd-typecol">int</td>
1026        <td class="jd-linkcol"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#ROOM_STATUS_INVITING">ROOM_STATUS_INVITING</a></td>
1027        <td class="jd-descrcol" width="100%">
1028          Constant returned by <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getStatus()">getStatus()</a></code> indicating that the room has one or more players
1029 that have been invited and have not responded yet.
1030
1031
1032
1033        </td>
1034    </tr>
1035
1036
1037    <tr class="alt-color api apilevel-" >
1038        <td class="jd-typecol">int</td>
1039        <td class="jd-linkcol"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#ROOM_VARIANT_DEFAULT">ROOM_VARIANT_DEFAULT</a></td>
1040        <td class="jd-descrcol" width="100%">
1041          Constant used to indicate that the variant for a room is unspecified.
1042
1043
1044
1045        </td>
1046    </tr>
1047
1048
1049
1050</table>
1051
1052
1053
1054
1055
1056<!-- =========== ENUM CONSTANT SUMMARY =========== -->
1057<table id="inhconstants" class="jd-sumtable"><tr><th>
1058  <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
1059  <div style="clear:left;">Inherited Constants</div></th></tr>
1060
1061
1062<tr class="api apilevel-" >
1063<td colspan="12">
1064
1065  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-android.os.Parcelable" class="jd-expando-trigger closed"
1066          ><img id="inherited-constants-android.os.Parcelable-trigger"
1067          src="/assets/images/triangle-closed.png"
1068          class="jd-expando-trigger-img" /></a>From interface
1069android.os.Parcelable
1070<div id="inherited-constants-android.os.Parcelable">
1071  <div id="inherited-constants-android.os.Parcelable-list"
1072        class="jd-inheritedlinks">
1073  </div>
1074  <div id="inherited-constants-android.os.Parcelable-summary" style="display: none;">
1075    <table class="jd-sumtable-expando">
1076
1077
1078
1079    <tr class="alt-color api apilevel-" >
1080        <td class="jd-typecol">int</td>
1081        <td class="jd-linkcol">CONTENTS_FILE_DESCRIPTOR</td>
1082        <td class="jd-descrcol" width="100%">
1083
1084
1085
1086
1087        </td>
1088    </tr>
1089
1090
1091    <tr class=" api apilevel-" >
1092        <td class="jd-typecol">int</td>
1093        <td class="jd-linkcol">PARCELABLE_WRITE_RETURN_VALUE</td>
1094        <td class="jd-descrcol" width="100%">
1095
1096
1097
1098
1099        </td>
1100    </tr>
1101
1102
1103</table>
1104  </div>
1105</div>
1106</td></tr>
1107
1108
1109
1110
1111
1112
1113</table>
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127<!-- ========== METHOD SUMMARY =========== -->
1128<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
1129
1130
1131
1132
1133    <tr class="alt-color api apilevel-" >
1134        <td class="jd-typecol"><nobr>
1135            abstract
1136
1137
1138
1139
1140            Bundle</nobr>
1141        </td>
1142        <td class="jd-linkcol" width="100%"><nobr>
1143        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getAutoMatchCriteria()">getAutoMatchCriteria</a></span>()</nobr>
1144
1145        <div class="jd-descrdiv">
1146          Retrieves the automatch criteria used to create or join this room, if any.
1147
1148
1149
1150        </div>
1151
1152  </td></tr>
1153
1154
1155
1156    <tr class=" api apilevel-" >
1157        <td class="jd-typecol"><nobr>
1158            abstract
1159
1160
1161
1162
1163            int</nobr>
1164        </td>
1165        <td class="jd-linkcol" width="100%"><nobr>
1166        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getAutoMatchWaitEstimateSeconds()">getAutoMatchWaitEstimateSeconds</a></span>()</nobr>
1167
1168        <div class="jd-descrdiv">
1169          Retrieves the estimated wait time for automatching to finish for players who are not
1170 automatched immediately, as measured from the time that the room entered the
1171 automatching pool.
1172
1173
1174
1175        </div>
1176
1177  </td></tr>
1178
1179
1180
1181    <tr class="alt-color api apilevel-" >
1182        <td class="jd-typecol"><nobr>
1183            abstract
1184
1185
1186
1187
1188            long</nobr>
1189        </td>
1190        <td class="jd-linkcol" width="100%"><nobr>
1191        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getCreationTimestamp()">getCreationTimestamp</a></span>()</nobr>
1192
1193  </td></tr>
1194
1195
1196
1197    <tr class=" api apilevel-" >
1198        <td class="jd-typecol"><nobr>
1199            abstract
1200
1201
1202
1203
1204            String</nobr>
1205        </td>
1206        <td class="jd-linkcol" width="100%"><nobr>
1207        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getCreatorId()">getCreatorId</a></span>()</nobr>
1208
1209  </td></tr>
1210
1211
1212
1213    <tr class="alt-color api apilevel-" >
1214        <td class="jd-typecol"><nobr>
1215            abstract
1216
1217
1218
1219
1220            String</nobr>
1221        </td>
1222        <td class="jd-linkcol" width="100%"><nobr>
1223        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getDescription()">getDescription</a></span>()</nobr>
1224
1225  </td></tr>
1226
1227
1228
1229    <tr class=" api apilevel-" >
1230        <td class="jd-typecol"><nobr>
1231            abstract
1232
1233
1234
1235
1236            void</nobr>
1237        </td>
1238        <td class="jd-linkcol" width="100%"><nobr>
1239        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getDescription(android.database.CharArrayBuffer)">getDescription</a></span>(CharArrayBuffer dataOut)</nobr>
1240
1241        <div class="jd-descrdiv">
1242          Loads the room description into the given <code><a href="/reference/android/database/CharArrayBuffer.html">CharArrayBuffer</a></code>.
1243
1244
1245
1246        </div>
1247
1248  </td></tr>
1249
1250
1251
1252    <tr class="alt-color api apilevel-" >
1253        <td class="jd-typecol"><nobr>
1254            abstract
1255
1256
1257
1258
1259            <a href="/reference/com/google/android/gms/games/multiplayer/Participant.html">Participant</a></nobr>
1260        </td>
1261        <td class="jd-linkcol" width="100%"><nobr>
1262        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getParticipant(java.lang.String)">getParticipant</a></span>(String participantId)</nobr>
1263
1264        <div class="jd-descrdiv">
1265          Get a participant in a room by its ID.
1266
1267
1268
1269        </div>
1270
1271  </td></tr>
1272
1273
1274
1275    <tr class=" api apilevel-" >
1276        <td class="jd-typecol"><nobr>
1277            abstract
1278
1279
1280
1281
1282            String</nobr>
1283        </td>
1284        <td class="jd-linkcol" width="100%"><nobr>
1285        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getParticipantId(java.lang.String)">getParticipantId</a></span>(String playerId)</nobr>
1286
1287        <div class="jd-descrdiv">
1288          Get the participant ID for a given player.
1289
1290
1291
1292        </div>
1293
1294  </td></tr>
1295
1296
1297
1298    <tr class="alt-color api apilevel-" >
1299        <td class="jd-typecol"><nobr>
1300            abstract
1301
1302
1303
1304
1305            ArrayList&lt;String&gt;</nobr>
1306        </td>
1307        <td class="jd-linkcol" width="100%"><nobr>
1308        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getParticipantIds()">getParticipantIds</a></span>()</nobr>
1309
1310        <div class="jd-descrdiv">
1311          Get the IDs of the participants of the given room.
1312
1313
1314
1315        </div>
1316
1317  </td></tr>
1318
1319
1320
1321    <tr class=" api apilevel-" >
1322        <td class="jd-typecol"><nobr>
1323            abstract
1324
1325
1326
1327
1328            int</nobr>
1329        </td>
1330        <td class="jd-linkcol" width="100%"><nobr>
1331        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getParticipantStatus(java.lang.String)">getParticipantStatus</a></span>(String participantId)</nobr>
1332
1333        <div class="jd-descrdiv">
1334          Get the status of a participant in a room.
1335
1336
1337
1338        </div>
1339
1340  </td></tr>
1341
1342
1343
1344    <tr class="alt-color api apilevel-" >
1345        <td class="jd-typecol"><nobr>
1346            abstract
1347
1348
1349
1350
1351            String</nobr>
1352        </td>
1353        <td class="jd-linkcol" width="100%"><nobr>
1354        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getRoomId()">getRoomId</a></span>()</nobr>
1355
1356  </td></tr>
1357
1358
1359
1360    <tr class=" api apilevel-" >
1361        <td class="jd-typecol"><nobr>
1362            abstract
1363
1364
1365
1366
1367            int</nobr>
1368        </td>
1369        <td class="jd-linkcol" width="100%"><nobr>
1370        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getStatus()">getStatus</a></span>()</nobr>
1371
1372  </td></tr>
1373
1374
1375
1376    <tr class="alt-color api apilevel-" >
1377        <td class="jd-typecol"><nobr>
1378            abstract
1379
1380
1381
1382
1383            int</nobr>
1384        </td>
1385        <td class="jd-linkcol" width="100%"><nobr>
1386        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getVariant()">getVariant</a></span>()</nobr>
1387
1388  </td></tr>
1389
1390
1391
1392</table>
1393
1394
1395
1396
1397
1398
1399
1400<!-- ========== METHOD SUMMARY =========== -->
1401<table id="inhmethods" class="jd-sumtable"><tr><th>
1402  <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
1403  <div style="clear:left;">Inherited Methods</div></th></tr>
1404
1405
1406<tr class="api apilevel-" >
1407<td colspan="12">
1408  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.os.Parcelable" class="jd-expando-trigger closed"
1409          ><img id="inherited-methods-android.os.Parcelable-trigger"
1410          src="/assets/images/triangle-closed.png"
1411          class="jd-expando-trigger-img" /></a>
1412From interface
1413
1414  android.os.Parcelable
1415
1416<div id="inherited-methods-android.os.Parcelable">
1417  <div id="inherited-methods-android.os.Parcelable-list"
1418        class="jd-inheritedlinks">
1419  </div>
1420  <div id="inherited-methods-android.os.Parcelable-summary" style="display: none;">
1421    <table class="jd-sumtable-expando">
1422
1423
1424
1425
1426    <tr class="alt-color api apilevel-" >
1427        <td class="jd-typecol"><nobr>
1428            abstract
1429
1430
1431
1432
1433            int</nobr>
1434        </td>
1435        <td class="jd-linkcol" width="100%"><nobr>
1436        <span class="sympad">describeContents</span>()</nobr>
1437
1438  </td></tr>
1439
1440
1441
1442    <tr class=" api apilevel-" >
1443        <td class="jd-typecol"><nobr>
1444            abstract
1445
1446
1447
1448
1449            void</nobr>
1450        </td>
1451        <td class="jd-linkcol" width="100%"><nobr>
1452        <span class="sympad">writeToParcel</span>(Parcel arg0, int arg1)</nobr>
1453
1454  </td></tr>
1455
1456
1457</table>
1458  </div>
1459</div>
1460</td></tr>
1461
1462
1463
1464<tr class="api apilevel-" >
1465<td colspan="12">
1466  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-com.google.android.gms.common.data.Freezable" class="jd-expando-trigger closed"
1467          ><img id="inherited-methods-com.google.android.gms.common.data.Freezable-trigger"
1468          src="/assets/images/triangle-closed.png"
1469          class="jd-expando-trigger-img" /></a>
1470From interface
1471
1472  <a href="/reference/com/google/android/gms/common/data/Freezable.html">com.google.android.gms.common.data.Freezable</a>
1473
1474<div id="inherited-methods-com.google.android.gms.common.data.Freezable">
1475  <div id="inherited-methods-com.google.android.gms.common.data.Freezable-list"
1476        class="jd-inheritedlinks">
1477  </div>
1478  <div id="inherited-methods-com.google.android.gms.common.data.Freezable-summary" style="display: none;">
1479    <table class="jd-sumtable-expando">
1480
1481
1482
1483
1484    <tr class="alt-color api apilevel-" >
1485        <td class="jd-typecol"><nobr>
1486            abstract
1487
1488
1489
1490
1491            T</nobr>
1492        </td>
1493        <td class="jd-linkcol" width="100%"><nobr>
1494        <span class="sympad"><a href="/reference/com/google/android/gms/common/data/Freezable.html#freeze()">freeze</a></span>()</nobr>
1495
1496        <div class="jd-descrdiv">
1497          Freeze a volatile representation into an immutable representation.
1498
1499
1500
1501        </div>
1502
1503  </td></tr>
1504
1505
1506
1507    <tr class=" api apilevel-" >
1508        <td class="jd-typecol"><nobr>
1509            abstract
1510
1511
1512
1513
1514            boolean</nobr>
1515        </td>
1516        <td class="jd-linkcol" width="100%"><nobr>
1517        <span class="sympad"><a href="/reference/com/google/android/gms/common/data/Freezable.html#isDataValid()">isDataValid</a></span>()</nobr>
1518
1519        <div class="jd-descrdiv">
1520          Check to see if this object is valid for use.
1521
1522
1523
1524        </div>
1525
1526  </td></tr>
1527
1528
1529</table>
1530  </div>
1531</div>
1532</td></tr>
1533
1534
1535
1536<tr class="api apilevel-" >
1537<td colspan="12">
1538  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-com.google.android.gms.games.multiplayer.Participatable" class="jd-expando-trigger closed"
1539          ><img id="inherited-methods-com.google.android.gms.games.multiplayer.Participatable-trigger"
1540          src="/assets/images/triangle-closed.png"
1541          class="jd-expando-trigger-img" /></a>
1542From interface
1543
1544  <a href="/reference/com/google/android/gms/games/multiplayer/Participatable.html">com.google.android.gms.games.multiplayer.Participatable</a>
1545
1546<div id="inherited-methods-com.google.android.gms.games.multiplayer.Participatable">
1547  <div id="inherited-methods-com.google.android.gms.games.multiplayer.Participatable-list"
1548        class="jd-inheritedlinks">
1549  </div>
1550  <div id="inherited-methods-com.google.android.gms.games.multiplayer.Participatable-summary" style="display: none;">
1551    <table class="jd-sumtable-expando">
1552
1553
1554
1555
1556    <tr class="alt-color api apilevel-" >
1557        <td class="jd-typecol"><nobr>
1558            abstract
1559
1560
1561
1562
1563            ArrayList&lt;<a href="/reference/com/google/android/gms/games/multiplayer/Participant.html">Participant</a>&gt;</nobr>
1564        </td>
1565        <td class="jd-linkcol" width="100%"><nobr>
1566        <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/Participatable.html#getParticipants()">getParticipants</a></span>()</nobr>
1567
1568        <div class="jd-descrdiv">
1569          Retrieve the <code><a href="/reference/com/google/android/gms/games/multiplayer/Participant.html">Participant</a></code>s for this object.
1570
1571
1572
1573        </div>
1574
1575  </td></tr>
1576
1577
1578</table>
1579  </div>
1580</div>
1581</td></tr>
1582
1583
1584</table>
1585
1586
1587</div><!-- jd-descr (summary) -->
1588
1589<!-- Details -->
1590
1591
1592
1593
1594
1595
1596
1597
1598<!-- XML Attributes -->
1599
1600
1601<!-- Enum Values -->
1602
1603
1604<!-- Constants -->
1605
1606
1607<!-- ========= ENUM CONSTANTS DETAIL ======== -->
1608<h2>Constants</h2>
1609
1610
1611
1612
1613<A NAME="ROOM_STATUS_ACTIVE"></A>
1614
1615<div class="jd-details api apilevel-">
1616    <h4 class="jd-details-title">
1617      <span class="normal">
1618        public
1619        static
1620        final
1621        int
1622      </span>
1623        ROOM_STATUS_ACTIVE
1624    </h4>
1625      <div class="api-level">
1626
1627
1628
1629
1630      </div>
1631    <div class="jd-details-descr">
1632
1633
1634
1635
1636  <div class="jd-tagdata jd-tagdescr"><p>Constant returned by <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getStatus()">getStatus()</a></code> indicating that the room is active and connections
1637 are established.
1638</p></div>
1639
1640
1641        <div class="jd-tagdata">
1642        <span class="jd-tagtitle">Constant Value: </span>
1643        <span>
1644
1645                3
1646                (0x00000003)
1647
1648        </span>
1649        </div>
1650
1651    </div>
1652</div>
1653
1654
1655
1656<A NAME="ROOM_STATUS_AUTO_MATCHING"></A>
1657
1658<div class="jd-details api apilevel-">
1659    <h4 class="jd-details-title">
1660      <span class="normal">
1661        public
1662        static
1663        final
1664        int
1665      </span>
1666        ROOM_STATUS_AUTO_MATCHING
1667    </h4>
1668      <div class="api-level">
1669
1670
1671
1672
1673      </div>
1674    <div class="jd-details-descr">
1675
1676
1677
1678
1679  <div class="jd-tagdata jd-tagdescr"><p>Constant returned by <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getStatus()">getStatus()</a></code> indicating that one or more slots are waiting to be
1680 filled by auto-matching.
1681</p></div>
1682
1683
1684        <div class="jd-tagdata">
1685        <span class="jd-tagtitle">Constant Value: </span>
1686        <span>
1687
1688                1
1689                (0x00000001)
1690
1691        </span>
1692        </div>
1693
1694    </div>
1695</div>
1696
1697
1698
1699<A NAME="ROOM_STATUS_CONNECTING"></A>
1700
1701<div class="jd-details api apilevel-">
1702    <h4 class="jd-details-title">
1703      <span class="normal">
1704        public
1705        static
1706        final
1707        int
1708      </span>
1709        ROOM_STATUS_CONNECTING
1710    </h4>
1711      <div class="api-level">
1712
1713
1714
1715
1716      </div>
1717    <div class="jd-details-descr">
1718
1719
1720
1721
1722  <div class="jd-tagdata jd-tagdescr"><p>Constant returned by <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getStatus()">getStatus()</a></code> indicating that this room is waiting for clients to
1723 connect to each other.
1724</p></div>
1725
1726
1727        <div class="jd-tagdata">
1728        <span class="jd-tagtitle">Constant Value: </span>
1729        <span>
1730
1731                2
1732                (0x00000002)
1733
1734        </span>
1735        </div>
1736
1737    </div>
1738</div>
1739
1740
1741
1742<A NAME="ROOM_STATUS_INVITING"></A>
1743
1744<div class="jd-details api apilevel-">
1745    <h4 class="jd-details-title">
1746      <span class="normal">
1747        public
1748        static
1749        final
1750        int
1751      </span>
1752        ROOM_STATUS_INVITING
1753    </h4>
1754      <div class="api-level">
1755
1756
1757
1758
1759      </div>
1760    <div class="jd-details-descr">
1761
1762
1763
1764
1765  <div class="jd-tagdata jd-tagdescr"><p>Constant returned by <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#getStatus()">getStatus()</a></code> indicating that the room has one or more players
1766 that have been invited and have not responded yet.
1767</p></div>
1768
1769
1770        <div class="jd-tagdata">
1771        <span class="jd-tagtitle">Constant Value: </span>
1772        <span>
1773
1774                0
1775                (0x00000000)
1776
1777        </span>
1778        </div>
1779
1780    </div>
1781</div>
1782
1783
1784
1785<A NAME="ROOM_VARIANT_DEFAULT"></A>
1786
1787<div class="jd-details api apilevel-">
1788    <h4 class="jd-details-title">
1789      <span class="normal">
1790        public
1791        static
1792        final
1793        int
1794      </span>
1795        ROOM_VARIANT_DEFAULT
1796    </h4>
1797      <div class="api-level">
1798
1799
1800
1801
1802      </div>
1803    <div class="jd-details-descr">
1804
1805
1806
1807
1808  <div class="jd-tagdata jd-tagdescr"><p>Constant used to indicate that the variant for a room is unspecified.
1809</p></div>
1810
1811
1812        <div class="jd-tagdata">
1813        <span class="jd-tagtitle">Constant Value: </span>
1814        <span>
1815
1816                -1
1817                (0xffffffff)
1818
1819        </span>
1820        </div>
1821
1822    </div>
1823</div>
1824
1825
1826
1827
1828<!-- Fields -->
1829
1830
1831<!-- Public ctors -->
1832
1833
1834
1835<!-- ========= CONSTRUCTOR DETAIL ======== -->
1836<!-- Protected ctors -->
1837
1838
1839
1840<!-- ========= METHOD DETAIL ======== -->
1841<!-- Public methdos -->
1842
1843<h2>Public Methods</h2>
1844
1845
1846
1847<A NAME="getAutoMatchCriteria()"></A>
1848
1849<div class="jd-details api apilevel-">
1850    <h4 class="jd-details-title">
1851      <span class="normal">
1852        public
1853
1854
1855        abstract
1856
1857        Bundle
1858      </span>
1859      <span class="sympad">getAutoMatchCriteria</span>
1860      <span class="normal">()</span>
1861    </h4>
1862      <div class="api-level">
1863        <div></div>
1864
1865
1866
1867      </div>
1868    <div class="jd-details-descr">
1869
1870
1871
1872
1873  <div class="jd-tagdata jd-tagdescr"><p>Retrieves the automatch criteria used to create or join this room, if any. May be null if the
1874 room has no automatch properties.</p></div>
1875  <div class="jd-tagdata">
1876      <h5 class="jd-tagtitle">Returns</h5>
1877      <ul class="nolist"><li>A bundle containing the automatch criteria for this room.
1878</li></ul>
1879  </div>
1880
1881    </div>
1882</div>
1883
1884
1885<A NAME="getAutoMatchWaitEstimateSeconds()"></A>
1886
1887<div class="jd-details api apilevel-">
1888    <h4 class="jd-details-title">
1889      <span class="normal">
1890        public
1891
1892
1893        abstract
1894
1895        int
1896      </span>
1897      <span class="sympad">getAutoMatchWaitEstimateSeconds</span>
1898      <span class="normal">()</span>
1899    </h4>
1900      <div class="api-level">
1901        <div></div>
1902
1903
1904
1905      </div>
1906    <div class="jd-details-descr">
1907
1908
1909
1910
1911  <div class="jd-tagdata jd-tagdescr"><p>Retrieves the estimated wait time for automatching to finish for players who are not
1912 automatched immediately, as measured from the time that the room entered the
1913 automatching pool.</p></div>
1914  <div class="jd-tagdata">
1915      <h5 class="jd-tagtitle">Returns</h5>
1916      <ul class="nolist"><li>The estimated wait time in seconds, or -1 if the room is not
1917         automatching or no estimate could be provided.
1918</li></ul>
1919  </div>
1920
1921    </div>
1922</div>
1923
1924
1925<A NAME="getCreationTimestamp()"></A>
1926
1927<div class="jd-details api apilevel-">
1928    <h4 class="jd-details-title">
1929      <span class="normal">
1930        public
1931
1932
1933        abstract
1934
1935        long
1936      </span>
1937      <span class="sympad">getCreationTimestamp</span>
1938      <span class="normal">()</span>
1939    </h4>
1940      <div class="api-level">
1941        <div></div>
1942
1943
1944
1945      </div>
1946    <div class="jd-details-descr">
1947
1948
1949
1950
1951  <div class="jd-tagdata jd-tagdescr"><p></p></div>
1952  <div class="jd-tagdata">
1953      <h5 class="jd-tagtitle">Returns</h5>
1954      <ul class="nolist"><li>The server timestamp at which the room was created.
1955</li></ul>
1956  </div>
1957
1958    </div>
1959</div>
1960
1961
1962<A NAME="getCreatorId()"></A>
1963
1964<div class="jd-details api apilevel-">
1965    <h4 class="jd-details-title">
1966      <span class="normal">
1967        public
1968
1969
1970        abstract
1971
1972        String
1973      </span>
1974      <span class="sympad">getCreatorId</span>
1975      <span class="normal">()</span>
1976    </h4>
1977      <div class="api-level">
1978        <div></div>
1979
1980
1981
1982      </div>
1983    <div class="jd-details-descr">
1984
1985
1986
1987
1988  <div class="jd-tagdata jd-tagdescr"><p></p></div>
1989  <div class="jd-tagdata">
1990      <h5 class="jd-tagtitle">Returns</h5>
1991      <ul class="nolist"><li>The ID of the participant who created this Room. Note that not all participants will
1992         see the same value for the creator. In the case of an automatch, this value may
1993         differ for each participant.
1994</li></ul>
1995  </div>
1996
1997    </div>
1998</div>
1999
2000
2001<A NAME="getDescription()"></A>
2002
2003<div class="jd-details api apilevel-">
2004    <h4 class="jd-details-title">
2005      <span class="normal">
2006        public
2007
2008
2009        abstract
2010
2011        String
2012      </span>
2013      <span class="sympad">getDescription</span>
2014      <span class="normal">()</span>
2015    </h4>
2016      <div class="api-level">
2017        <div></div>
2018
2019
2020
2021      </div>
2022    <div class="jd-details-descr">
2023
2024
2025
2026
2027  <div class="jd-tagdata jd-tagdescr"><p></p></div>
2028  <div class="jd-tagdata">
2029      <h5 class="jd-tagtitle">Returns</h5>
2030      <ul class="nolist"><li>Description of this room.
2031</li></ul>
2032  </div>
2033
2034    </div>
2035</div>
2036
2037
2038<A NAME="getDescription(android.database.CharArrayBuffer)"></A>
2039
2040<div class="jd-details api apilevel-">
2041    <h4 class="jd-details-title">
2042      <span class="normal">
2043        public
2044
2045
2046        abstract
2047
2048        void
2049      </span>
2050      <span class="sympad">getDescription</span>
2051      <span class="normal">(CharArrayBuffer dataOut)</span>
2052    </h4>
2053      <div class="api-level">
2054        <div></div>
2055
2056
2057
2058      </div>
2059    <div class="jd-details-descr">
2060
2061
2062
2063
2064  <div class="jd-tagdata jd-tagdescr"><p>Loads the room description into the given <code><a href="/reference/android/database/CharArrayBuffer.html">CharArrayBuffer</a></code>.</p></div>
2065  <div class="jd-tagdata">
2066      <h5 class="jd-tagtitle">Parameters</h5>
2067      <table class="jd-tagtable">
2068        <tr>
2069          <th>dataOut</td>
2070          <td>The buffer to load the data into.
2071</td>
2072        </tr>
2073      </table>
2074  </div>
2075
2076    </div>
2077</div>
2078
2079
2080<A NAME="getParticipant(java.lang.String)"></A>
2081
2082<div class="jd-details api apilevel-">
2083    <h4 class="jd-details-title">
2084      <span class="normal">
2085        public
2086
2087
2088        abstract
2089
2090        <a href="/reference/com/google/android/gms/games/multiplayer/Participant.html">Participant</a>
2091      </span>
2092      <span class="sympad">getParticipant</span>
2093      <span class="normal">(String participantId)</span>
2094    </h4>
2095      <div class="api-level">
2096        <div></div>
2097
2098
2099
2100      </div>
2101    <div class="jd-details-descr">
2102
2103
2104
2105
2106  <div class="jd-tagdata jd-tagdescr"><p>Get a participant in a room by its ID. Note that the participant ID must correspond to a
2107 participant in this match, or this method will throw an exception.</p></div>
2108  <div class="jd-tagdata">
2109      <h5 class="jd-tagtitle">Parameters</h5>
2110      <table class="jd-tagtable">
2111        <tr>
2112          <th>participantId</td>
2113          <td>Match-local ID of the participant to retrieve status for.</td>
2114        </tr>
2115      </table>
2116  </div>
2117  <div class="jd-tagdata">
2118      <h5 class="jd-tagtitle">Returns</h5>
2119      <ul class="nolist"><li>The participant corresponding to the given ID.</li></ul>
2120  </div>
2121  <div class="jd-tagdata">
2122      <h5 class="jd-tagtitle">Throws</h5>
2123      <table class="jd-tagtable">
2124        <tr>
2125            <th></td>
2126            <td>IllegalStateException} if the participant is not a participant in this match.
2127</td>
2128        </tr>
2129      </table>
2130  </div>
2131
2132    </div>
2133</div>
2134
2135
2136<A NAME="getParticipantId(java.lang.String)"></A>
2137
2138<div class="jd-details api apilevel-">
2139    <h4 class="jd-details-title">
2140      <span class="normal">
2141        public
2142
2143
2144        abstract
2145
2146        String
2147      </span>
2148      <span class="sympad">getParticipantId</span>
2149      <span class="normal">(String playerId)</span>
2150    </h4>
2151      <div class="api-level">
2152        <div></div>
2153
2154
2155
2156      </div>
2157    <div class="jd-details-descr">
2158
2159
2160
2161
2162  <div class="jd-tagdata jd-tagdescr"><p>Get the participant ID for a given player. This will only return a non-null ID if the player
2163 is actually a participant in the room and that player's identity is visible to the current
2164 player. Note that this will always return non-null for the current player.</p></div>
2165  <div class="jd-tagdata">
2166      <h5 class="jd-tagtitle">Parameters</h5>
2167      <table class="jd-tagtable">
2168        <tr>
2169          <th>playerId</td>
2170          <td>Player ID to find participant ID for.</td>
2171        </tr>
2172      </table>
2173  </div>
2174  <div class="jd-tagdata">
2175      <h5 class="jd-tagtitle">Returns</h5>
2176      <ul class="nolist"><li>The participant ID corresponding to given player, or null if none found.
2177</li></ul>
2178  </div>
2179
2180    </div>
2181</div>
2182
2183
2184<A NAME="getParticipantIds()"></A>
2185
2186<div class="jd-details api apilevel-">
2187    <h4 class="jd-details-title">
2188      <span class="normal">
2189        public
2190
2191
2192        abstract
2193
2194        ArrayList&lt;String&gt;
2195      </span>
2196      <span class="sympad">getParticipantIds</span>
2197      <span class="normal">()</span>
2198    </h4>
2199      <div class="api-level">
2200        <div></div>
2201
2202
2203
2204      </div>
2205    <div class="jd-details-descr">
2206
2207
2208
2209
2210  <div class="jd-tagdata jd-tagdescr"><p>Get the IDs of the participants of the given room.</p></div>
2211  <div class="jd-tagdata">
2212      <h5 class="jd-tagtitle">Returns</h5>
2213      <ul class="nolist"><li>The IDs of the participants in this room. These are returned in the participant
2214         order of the room. Note that these are not stable across rooms.
2215</li></ul>
2216  </div>
2217
2218    </div>
2219</div>
2220
2221
2222<A NAME="getParticipantStatus(java.lang.String)"></A>
2223
2224<div class="jd-details api apilevel-">
2225    <h4 class="jd-details-title">
2226      <span class="normal">
2227        public
2228
2229
2230        abstract
2231
2232        int
2233      </span>
2234      <span class="sympad">getParticipantStatus</span>
2235      <span class="normal">(String participantId)</span>
2236    </h4>
2237      <div class="api-level">
2238        <div></div>
2239
2240
2241
2242      </div>
2243    <div class="jd-details-descr">
2244
2245
2246
2247
2248  <div class="jd-tagdata jd-tagdescr"><p>Get the status of a participant in a room. Note that the participant ID must correspond to a
2249 participant in this room, or this method will throw an exception.</p></div>
2250  <div class="jd-tagdata">
2251      <h5 class="jd-tagtitle">Parameters</h5>
2252      <table class="jd-tagtable">
2253        <tr>
2254          <th>participantId</td>
2255          <td>Room-local ID of the participant to retrieve status for.</td>
2256        </tr>
2257      </table>
2258  </div>
2259  <div class="jd-tagdata">
2260      <h5 class="jd-tagtitle">Returns</h5>
2261      <ul class="nolist"><li>The current status of the participant in this room. One of
2262         <code><a href="/reference/com/google/android/gms/games/multiplayer/Participant.html#STATUS_INVITED">STATUS_INVITED</a></code>, <code><a href="/reference/com/google/android/gms/games/multiplayer/Participant.html#STATUS_JOINED">STATUS_JOINED</a></code>,
2263         <code><a href="/reference/com/google/android/gms/games/multiplayer/Participant.html#STATUS_DECLINED">STATUS_DECLINED</a></code>, or <code><a href="/reference/com/google/android/gms/games/multiplayer/Participant.html#STATUS_LEFT">STATUS_LEFT</a></code>.</li></ul>
2264  </div>
2265  <div class="jd-tagdata">
2266      <h5 class="jd-tagtitle">Throws</h5>
2267      <table class="jd-tagtable">
2268        <tr>
2269            <th></td>
2270            <td>IllegalStateException} if the participant is not a participant in this room.
2271</td>
2272        </tr>
2273      </table>
2274  </div>
2275
2276    </div>
2277</div>
2278
2279
2280<A NAME="getRoomId()"></A>
2281
2282<div class="jd-details api apilevel-">
2283    <h4 class="jd-details-title">
2284      <span class="normal">
2285        public
2286
2287
2288        abstract
2289
2290        String
2291      </span>
2292      <span class="sympad">getRoomId</span>
2293      <span class="normal">()</span>
2294    </h4>
2295      <div class="api-level">
2296        <div></div>
2297
2298
2299
2300      </div>
2301    <div class="jd-details-descr">
2302
2303
2304
2305
2306  <div class="jd-tagdata jd-tagdescr"><p></p></div>
2307  <div class="jd-tagdata">
2308      <h5 class="jd-tagtitle">Returns</h5>
2309      <ul class="nolist"><li>The ID of this Room.
2310</li></ul>
2311  </div>
2312
2313    </div>
2314</div>
2315
2316
2317<A NAME="getStatus()"></A>
2318
2319<div class="jd-details api apilevel-">
2320    <h4 class="jd-details-title">
2321      <span class="normal">
2322        public
2323
2324
2325        abstract
2326
2327        int
2328      </span>
2329      <span class="sympad">getStatus</span>
2330      <span class="normal">()</span>
2331    </h4>
2332      <div class="api-level">
2333        <div></div>
2334
2335
2336
2337      </div>
2338    <div class="jd-details-descr">
2339
2340
2341
2342
2343  <div class="jd-tagdata jd-tagdescr"><p></p></div>
2344  <div class="jd-tagdata">
2345      <h5 class="jd-tagtitle">Returns</h5>
2346      <ul class="nolist"><li>The current status of the room. One of <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#ROOM_STATUS_INVITING">ROOM_STATUS_INVITING</a></code>,
2347         <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#ROOM_STATUS_ACTIVE">ROOM_STATUS_ACTIVE</a></code>, <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#ROOM_STATUS_AUTO_MATCHING">ROOM_STATUS_AUTO_MATCHING</a></code>,
2348         <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#ROOM_STATUS_CONNECTING">ROOM_STATUS_CONNECTING</a></code>.
2349</li></ul>
2350  </div>
2351
2352    </div>
2353</div>
2354
2355
2356<A NAME="getVariant()"></A>
2357
2358<div class="jd-details api apilevel-">
2359    <h4 class="jd-details-title">
2360      <span class="normal">
2361        public
2362
2363
2364        abstract
2365
2366        int
2367      </span>
2368      <span class="sympad">getVariant</span>
2369      <span class="normal">()</span>
2370    </h4>
2371      <div class="api-level">
2372        <div></div>
2373
2374
2375
2376      </div>
2377    <div class="jd-details-descr">
2378
2379
2380
2381
2382  <div class="jd-tagdata jd-tagdescr"><p></p></div>
2383  <div class="jd-tagdata">
2384      <h5 class="jd-tagtitle">Returns</h5>
2385      <ul class="nolist"><li>Variant specified for this room, if any. A variant is an optional
2386         developer-controlled parameter describing the type of game to play. If specified,
2387         this value will be a positive integer. If this room had no variant specified, returns
2388         <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html#ROOM_VARIANT_DEFAULT">ROOM_VARIANT_DEFAULT</a></code>.
2389</li></ul>
2390  </div>
2391
2392    </div>
2393</div>
2394
2395
2396
2397
2398
2399<!-- ========= METHOD DETAIL ======== -->
2400
2401
2402
2403<!-- ========= END OF CLASS DATA ========= -->
2404<A NAME="navbar_top"></A>
2405
2406<div id="footer" class="wrap" >
2407
2408
2409  <div id="copyright">
2410
2411  Except as noted, this content is licensed under <a
2412  href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
2413  For details and restrictions, see the <a href="/license.html">
2414  Content License</a>.
2415  </div>
2416  <div id="build_info">
2417
2418<script src="/timestamp.js" type="text/javascript"></script>
2419<script>document.write(BUILD_TIMESTAMP)</script>
2420
2421  </div>
2422
2423
2424  <div id="footerlinks">
2425
2426  <p>
2427    <a href="/about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp;
2428    <a href="/legal.html">Legal</a>&nbsp;&nbsp;|&nbsp;
2429    <a href="/support.html">Support</a>
2430  </p>
2431  </div>
2432
2433</div> <!-- end footer -->
2434</div> <!-- jd-content -->
2435
2436</div><!-- end doc-content -->
2437
2438</div> <!-- end body-content -->
2439
2440
2441
2442
2443
2444
2445</body>
2446</html>
2447