| <!DOCTYPE html> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <html> |
| <head> |
| |
| |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| <meta name="viewport" content="width=device-width" /> |
| |
| <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> |
| <title>RealTimeMultiplayer | Android Developers</title> |
| |
| <!-- STYLESHEETS --> |
| <link rel="stylesheet" |
| href="//fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto"> |
| <link href="/assets/css/default.css" rel="stylesheet" type="text/css"> |
| |
| |
| |
| <!-- JAVASCRIPT --> |
| <script src="//www.google.com/jsapi" type="text/javascript"></script> |
| <script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script> |
| <script type="text/javascript"> |
| var toRoot = "/"; |
| var metaTags = []; |
| var devsite = false; |
| </script> |
| <script src="/assets/js/docs.js" type="text/javascript"></script> |
| |
| <script type="text/javascript"> |
| var _gaq = _gaq || []; |
| _gaq.push(['_setAccount', 'UA-5831155-1']); |
| _gaq.push(['_trackPageview']); |
| |
| (function() { |
| var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
| ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
| var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
| })(); |
| </script> |
| </head> |
| <body class="gc-documentation google |
| develop" itemscope itemtype="http://schema.org/Article"> |
| <div id="doc-api-level" class="" style="display:none"></div> |
| <a name="top"></a> |
| |
| <a name="top"></a> |
| |
| <!-- Header --> |
| <div id="header"> |
| <div class="wrap" id="header-wrap"> |
| <div class="col-3 logo"> |
| <a href="/index.html"> |
| <img src="/assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" /> |
| </a> |
| <div class="btn-quicknav" id="btn-quicknav"> |
| <a href="#" class="arrow-inactive">Quicknav</a> |
| <a href="#" class="arrow-active">Quicknav</a> |
| </div> |
| </div> |
| <ul class="nav-x col-9"> |
| <li class="design"> |
| <a href="/design/index.html" |
| zh-tw-lang="設計" |
| zh-cn-lang="设计" |
| ru-lang="Проектирование" |
| ko-lang="디자인" |
| ja-lang="設計" |
| es-lang="Diseñar" |
| >Design</a></li> |
| <li class="develop"><a href="/develop/index.html" |
| zh-tw-lang="開發" |
| zh-cn-lang="开发" |
| ru-lang="Разработка" |
| ko-lang="개발" |
| ja-lang="開発" |
| es-lang="Desarrollar" |
| >Develop</a></li> |
| <li class="distribute last"><a href="/distribute/index.html" |
| zh-tw-lang="發佈" |
| zh-cn-lang="分发" |
| ru-lang="Распространение" |
| ko-lang="배포" |
| ja-lang="配布" |
| es-lang="Distribuir" |
| >Distribute</a></li> |
| </ul> |
| |
| <!-- New Search --> |
| <div class="menu-container"> |
| <div class="moremenu"> |
| <div id="more-btn"></div> |
| </div> |
| <div class="morehover" id="moremenu"> |
| <div class="top"></div> |
| <div class="mid"> |
| <div class="header">Links</div> |
| <ul> |
| <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> |
| <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> |
| <li><a href="/about/index.html">About Android</a></li> |
| </ul> |
| <div class="header">Android Sites</div> |
| <ul> |
| <li><a href="http://www.android.com">Android.com</a></li> |
| <li class="active"><a>Android Developers</a></li> |
| <li><a href="http://source.android.com">Android Open Source Project</a></li> |
| </ul> |
| |
| |
| |
| <div class="header">Language</div> |
| <div id="language" class="locales"> |
| <select name="language" onChange="changeLangPref(this.value, true)"> |
| <option value="en">English</option> |
| <option value="es">Español</option> |
| <option value="ja">日本語</option> |
| <option value="ko">한국어</option> |
| <option value="ru">Русский</option> |
| <option value="zh-cn">中文 (中国)</option> |
| <option value="zh-tw">中文 (台灣)</option> |
| </select> |
| </div> |
| <script type="text/javascript"> |
| <!-- |
| loadLangPref(); |
| //--> |
| </script> |
| |
| |
| |
| |
| <br class="clearfix" /> |
| </div> |
| <div class="bottom"></div> |
| </div> |
| <div class="search" id="search-container"> |
| <div class="search-inner"> |
| <div id="search-btn"></div> |
| <div class="left"></div> |
| <form onsubmit="return submit_search()"> |
| <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q" |
| onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)" |
| onkeydown="return search_changed(event, true, '/')" |
| onkeyup="return search_changed(event, false, '/')" /> |
| </form> |
| <div class="right"></div> |
| <a class="close hide">close</a> |
| <div class="left"></div> |
| <div class="right"></div> |
| </div> |
| </div> |
| |
| <div class="search_filtered_wrapper reference"> |
| <div class="suggest-card reference no-display"> |
| <ul class="search_filtered"> |
| </ul> |
| </div> |
| </div> |
| |
| <div class="search_filtered_wrapper docs"> |
| <div class="suggest-card dummy no-display"> </div> |
| <div class="suggest-card develop no-display"> |
| <ul class="search_filtered"> |
| </ul> |
| <div class="child-card guides no-display"> |
| </div> |
| <div class="child-card training no-display"> |
| </div> |
| <div class="child-card samples no-display"> |
| </div> |
| </div> |
| <div class="suggest-card design no-display"> |
| <ul class="search_filtered"> |
| </ul> |
| </div> |
| <div class="suggest-card distribute no-display"> |
| <ul class="search_filtered"> |
| </ul> |
| </div> |
| </div> |
| |
| </div> |
| <!-- /New Search> |
| |
| |
| <!-- Expanded quicknav --> |
| <div id="quicknav" class="col-9"> |
| <ul> |
| <li class="design"> |
| <ul> |
| <li><a href="/design/index.html">Get Started</a></li> |
| <li><a href="/design/style/index.html">Style</a></li> |
| <li><a href="/design/patterns/index.html">Patterns</a></li> |
| <li><a href="/design/building-blocks/index.html">Building Blocks</a></li> |
| <li><a href="/design/downloads/index.html">Downloads</a></li> |
| <li><a href="/design/videos/index.html">Videos</a></li> |
| </ul> |
| </li> |
| <li class="develop"> |
| <ul> |
| <li><a href="/training/index.html" |
| zh-tw-lang="訓練課程" |
| zh-cn-lang="培训" |
| ru-lang="Курсы" |
| ko-lang="교육" |
| ja-lang="トレーニング" |
| es-lang="Capacitación" |
| >Training</a></li> |
| <li><a href="/guide/index.html" |
| zh-tw-lang="API 指南" |
| zh-cn-lang="API 指南" |
| ru-lang="Руководства по API" |
| ko-lang="API 가이드" |
| ja-lang="API ガイド" |
| es-lang="Guías de la API" |
| >API Guides</a></li> |
| <li><a href="/reference/packages.html" |
| zh-tw-lang="參考資源" |
| zh-cn-lang="参考" |
| ru-lang="Справочник" |
| ko-lang="참조문서" |
| ja-lang="リファレンス" |
| es-lang="Referencia" |
| >Reference</a></li> |
| <li><a href="/tools/index.html" |
| zh-tw-lang="相關工具" |
| zh-cn-lang="工具" |
| ru-lang="Инструменты" |
| ko-lang="도구" |
| ja-lang="ツール" |
| es-lang="Herramientas" |
| >Tools</a> |
| <ul><li><a href="/sdk/index.html">Get the SDK</a></li></ul> |
| </li> |
| <li><a href="/google/index.html">Google Services</a> |
| </li> |
| |
| <li><a href="/samples/index.html">Samples</a> |
| </li> |
| |
| </ul> |
| </li> |
| <li class="distribute last"> |
| <ul> |
| <li><a href="/distribute/index.html">Google Play</a></li> |
| <li><a href="/distribute/googleplay/publish/index.html">Publishing</a></li> |
| <li><a href="/distribute/googleplay/promote/index.html">Promoting</a></li> |
| <li><a href="/distribute/googleplay/quality/index.html">App Quality</a></li> |
| <li><a href="/distribute/googleplay/spotlight/index.html">Spotlight</a></li> |
| <li><a href="/distribute/open.html">Open Distribution</a></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <!-- /Expanded quicknav --> |
| </div> |
| </div> |
| <!-- /Header --> |
| |
| |
| <div id="searchResults" class="wrap" style="display:none;"> |
| <h2 id="searchTitle">Results</h2> |
| <div id="leftSearchControl" class="search-control">Loading...</div> |
| </div> |
| |
| |
| |
| <!-- Secondary x-nav --> |
| <div id="nav-x"> |
| <div class="wrap"> |
| <ul class="nav-x col-9 develop" style="width:100%"> |
| <li class="training"><a href="/training/index.html" |
| zh-tw-lang="訓練課程" |
| zh-cn-lang="培训" |
| ru-lang="Курсы" |
| ko-lang="교육" |
| ja-lang="トレーニング" |
| es-lang="Capacitación" |
| >Training</a></li> |
| <li class="guide"><a href="/guide/index.html" |
| zh-tw-lang="API 指南" |
| zh-cn-lang="API 指南" |
| ru-lang="Руководства по API" |
| ko-lang="API 가이드" |
| ja-lang="API ガイド" |
| es-lang="Guías de la API" |
| >API Guides</a></li> |
| <li class="reference"><a href="/reference/packages.html" |
| zh-tw-lang="參考資源" |
| zh-cn-lang="参考" |
| ru-lang="Справочник" |
| ko-lang="참조문서" |
| ja-lang="リファレンス" |
| es-lang="Referencia" |
| >Reference</a></li> |
| <li class="tools"><a href="/tools/index.html" |
| zh-tw-lang="相關工具" |
| zh-cn-lang="工具" |
| ru-lang="Инструменты" |
| ko-lang="도구" |
| ja-lang="ツール" |
| es-lang="Herramientas" |
| >Tools</a></li> |
| <li class="google"><a href="/google/index.html" |
| >Google Services</a> |
| </li> |
| |
| <li class="samples"><a href="/samples/index.html" |
| >Samples</a> |
| </li> |
| |
| </ul> |
| </div> |
| |
| </div> |
| <!-- /Sendondary x-nav --> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="wrap clearfix" id="body-content"> |
| <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> |
| <div id="devdoc-nav" class="scroll-pane"> |
| <a class="totop" href="#top" data-g-event="left-nav-top">to top</a> |
| |
| |
| |
| <ul id="nav"> |
| |
| <li class="nav-section"> |
| <div class="nav-section-header empty"><a href="/google/index.html"> |
| <span class="en">Overview</span> |
| </a></div> |
| </li> |
| |
| <li class="nav-section"> |
| <div class="nav-section-header empty"><a href="/google/play-services/games.html"> |
| <span class="en">Games</span> |
| </a></div> |
| </li> |
| <li class="nav-section"> |
| <div class="nav-section-header empty"><a href="/google/play-services/location.html"> |
| <span class="en">Location</span> |
| </a></div> |
| </li> |
| <li class="nav-section"> |
| <div class="nav-section-header empty"><a href="/google/play-services/plus.html"> |
| <span class="en">Google+</span> |
| </a></div> |
| </li> |
| <li class="nav-section"> |
| <div class="nav-section-header empty"><a href="/google/play-services/maps.html"> |
| <span class="en">Maps</span> |
| </a></div> |
| </li> |
| <li class="nav-section"> |
| <div class="nav-section-header empty"><a href="/google/play-services/drive.html"> |
| <span class="en">Drive</span> |
| </a></div> |
| </li> |
| <li class="nav-section"> |
| <div class="nav-section-header empty"><a href="/google/play-services/cast.html"> |
| <span class="en">Cast</span> |
| </a></div> |
| </li> |
| <li class="nav-section"> |
| <div class="nav-section-header"><a href="/google/play-services/ads.html"> |
| <span class="en">Ads</span></a> |
| </div> |
| <ul> |
| <li><a href="/google/play-services/id.html"> |
| <span class="en">Advertising ID</span></a> |
| </li> |
| </ul> |
| </li> |
| <li class="nav-section"> |
| <div class="nav-section-header empty"><a href="/google/play-services/wallet.html"> |
| <span class="en">Wallet</span> |
| </a></div> |
| </li> |
| <li class="nav-section"> |
| <div class="nav-section-header empty"><a href="/google/play-services/auth.html"> |
| <span class="en">Authorization</span> |
| </a></div> |
| </li> |
| |
| |
| |
| <li class="nav-section"> |
| <div class="nav-section-header"><a href="/google/play-services/index.html"> |
| <span class="en">Google Play Services</span></a> |
| </div> |
| <ul> |
| <li><a href="/google/play-services/setup.html"> |
| <span class="en">Setup</span></a> |
| </li> |
| <li id="gms-tree-list" class="nav-section"> |
| <div class="nav-section-header"> |
| <a href="/reference/gms-packages.html"> |
| <span class="en">Reference</span> |
| </a> |
| <div> |
| </li> |
| </ul> |
| </li> |
| |
| |
| <li class="nav-section"> |
| <div class="nav-section-header"><a href="/google/play/billing/index.html"> |
| <span class="en">Google Play In-app Billing</span></a> |
| </div> |
| <ul> |
| <li><a href="/google/play/billing/billing_overview.html"> |
| <span class="en">Overview</span></a> |
| </li> |
| <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html"> |
| <span class="en">Version 3 API</span></a></div> |
| <ul> |
| <li><a href="/google/play/billing/billing_integrate.html"> |
| <span class="en">Implementing the API</span></a></li> |
| <li><a href="/google/play/billing/billing_reference.html"> |
| <span class="en">Reference</span></a></li> |
| </ul> |
| </li> |
| <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html"> |
| <span class="en">Version 2 API</span></a></div> |
| <ul> |
| <li><a href="/google/play/billing/v2/billing_integrate.html"> |
| <span class="en">Implementing the API</span></a></li> |
| <li><a href="/google/play/billing/v2/billing_subscriptions.html"> |
| <span class="en">Subscriptions</span></a></li> |
| <li><a href="/google/play/billing/v2/billing_reference.html"> |
| <span class="en">Reference</span></a></li> |
| </ul> |
| </li> |
| <li><a href="/google/play/billing/billing_subscriptions.html"> |
| <span class="en">Subscriptions</span></a> |
| </li> |
| <li><a href="/google/play/billing/billing_best_practices.html"> |
| <span class="en">Security and Design</span></a> |
| </li> |
| <li><a href="/google/play/billing/billing_testing.html"> |
| <span class="en">Testing In-app Billing</span></a> |
| </li> |
| <li><a href="/google/play/billing/billing_admin.html"> |
| <span class="en">Administering In-app Billing</span></a> |
| </li> |
| <li><a href="/google/play/billing/gp-purchase-status-api.html"> |
| <span class="en">Purchase Status API</span></a> |
| </li> |
| <li><a href="/google/play/billing/versions.html"> |
| <span class="en">Version Notes</span></a> |
| </li> |
| </ul> |
| </li> |
| |
| |
| |
| <li class="nav-section"> |
| <div class="nav-section-header"><a href="/google/gcm/index.html"> |
| <span class="en">Google Cloud Messaging</span></a> |
| </div> |
| <ul> |
| <li><a href="/google/gcm/gcm.html"> |
| <span class="en">Overview</span></a> |
| </li> |
| <li><a href="/google/gcm/gs.html"> |
| <span class="en">Getting Started</span></a> |
| </li> |
| <li><a href="/google/gcm/client.html"> |
| <span class="en">Implementing GCM Client</span></a> |
| </li> |
| <li class="nav-section"><div class="nav-section-header"><a href="/google/gcm/server.html"> |
| <span class="en">Implementing GCM Server</span></a></div> |
| <ul> |
| <li><a href="/google/gcm/ccs.html"> |
| <span class="en">CCS (XMPP)</span></a></li> |
| <li><a href="/google/gcm/http.html"> |
| <span class="en">HTTP</span></a></li> |
| </ul> |
| </li> |
| <li><a href="/google/gcm/notifications.html"> |
| <span class="en">User Notifications</span></a> |
| </li> |
| <li><a href="/google/gcm/adv.html"> |
| <span class="en">Advanced Topics</span></a> |
| </li> |
| <li><a href="/google/gcm/c2dm.html"> |
| <span class="en">Migration</span></a> |
| </li> |
| <li id="gcm-tree-list" class="nav-section"> |
| <div class="nav-section-header"> |
| <a href="/reference/gcm-packages.html"> |
| <span class="en">Reference</span> |
| </a> |
| <div> |
| </li> |
| </ul> |
| </li> |
| |
| <li class="nav-section"> |
| <div class="nav-section-header"><a href="/google/play/dist.html"> |
| <span class="en">Google Play Distribution</span></a> |
| </div> |
| <ul> |
| <li><a href="/google/play/filters.html"> |
| <span class="en">Filters on Google Play</span></a> |
| </li> |
| |
| <li><a href="/google/play/publishing/multiple-apks.html"> |
| <span class="en">Multiple APK Support</span></a> |
| </li> |
| <li><a href="/google/play/expansion-files.html"> |
| <span class="en">APK Expansion Files</span></a> |
| </li> |
| <li class="nav-section"> |
| <div class="nav-section-header"><a href="/google/play/licensing/index.html"> |
| <span class="en">Application Licensing</span></a> |
| </div> |
| <ul> |
| <li><a href="/google/play/licensing/overview.html"> |
| <span class="en">Licensing Overview</span></a> |
| </li> |
| <li><a href="/google/play/licensing/setting-up.html"> |
| <span class="en">Setting Up for Licensing</span></a> |
| </li> |
| <li><a href="/google/play/licensing/adding-licensing.html"> |
| <span class="en">Adding Licensing to Your App</span></a> |
| </li> |
| <li><a href="/google/play/licensing/licensing-reference.html"> |
| <span class="en">Licensing Reference</span></a> |
| </li> |
| </ul> |
| </li> |
| |
| <li class="nav-section"> |
| <div class="nav-section-header"><a href="/google/backup/index.html"> |
| Android Backup Service</a> |
| </div> |
| <ul> |
| <li><a href="/google/backup/signup.html"> |
| Register</a> |
| </li> |
| </ul> |
| </li> |
| |
| </ul> |
| |
| </li> |
| |
| |
| |
| </ul> |
| |
| <script type="text/javascript"> |
| <!-- |
| buildToggleLists(); |
| changeNavLang(getLangPref()); |
| //--> |
| </script> |
| |
| |
| |
| |
| </div> |
| <script type="text/javascript"> |
| showGoogleRefTree(); |
| |
| </script> |
| </div> <!-- end side-nav --> |
| <script> |
| $(document).ready(function() { |
| scrollIntoView("devdoc-nav"); |
| }); |
| </script> |
| |
| |
| |
| |
| |
| |
| <div class="col-12" id="doc-col"> |
| |
| <div id="api-info-block"> |
| |
| |
| |
| |
| <div class="sum-details-links"> |
| |
| </div><!-- end sum-details-links --> |
| <div class="api-level"> |
| |
| |
| |
| |
| </div> |
| </div><!-- end api-info-block --> |
| |
| |
| <!-- ======== START OF CLASS DATA ======== --> |
| |
| <div id="jd-header"> |
| public |
| |
| |
| |
| interface |
| <h1 itemprop="name">RealTimeMultiplayer</h1> |
| |
| |
| |
| |
| |
| |
| |
| |
| </div><!-- end header --> |
| |
| <div id="naMessage"></div> |
| |
| <div id="jd-content" class="api apilevel-"> |
| <table class="jd-inheritance-table"> |
| |
| |
| <tr> |
| |
| <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gms.games.multiplayer.realtime.RealTimeMultiplayer</td> |
| </tr> |
| |
| |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| <div class="jd-descr"> |
| |
| |
| <h2>Class Overview</h2> |
| <p itemprop="articleBody">Entry point for real-time multiplayer functionality. |
| </p> |
| |
| |
| |
| |
| |
| </div><!-- jd-descr --> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="jd-descr"> |
| |
| |
| <h2>Summary</h2> |
| |
| |
| |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <table id="nestedclasses" class="jd-sumtable"><tr><th colspan="12">Nested Classes</th></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| interface</nobr></td> |
| <td class="jd-linkcol"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.ReliableMessageSentCallback.html">RealTimeMultiplayer.ReliableMessageSentCallback</a></td> |
| <td class="jd-descrcol" width="100%">The listener for callback that is called when a reliable message is sent successfully. </td> |
| </tr> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- =========== ENUM CONSTANT SUMMARY =========== --> |
| <table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol">int</td> |
| <td class="jd-linkcol"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#REAL_TIME_MESSAGE_FAILED">REAL_TIME_MESSAGE_FAILED</a></td> |
| <td class="jd-descrcol" width="100%">Return value indicating immediate failure.</td> |
| </tr> |
| |
| |
| |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| <table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> |
| |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#create(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RoomConfig)">create</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, <a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomConfig.html">RoomConfig</a> config)</nobr> |
| |
| <div class="jd-descrdiv">Create a real-time room for the current game.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#declineInvitation(com.google.android.gms.common.api.GoogleApiClient, java.lang.String)">declineInvitation</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, String invitationId)</nobr> |
| |
| <div class="jd-descrdiv">Decline an invitation for a real-time room.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#dismissInvitation(com.google.android.gms.common.api.GoogleApiClient, java.lang.String)">dismissInvitation</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, String invitationId)</nobr> |
| |
| <div class="jd-descrdiv">Dismiss an invitation to a real-time room.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| Intent</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#getSelectOpponentsIntent(com.google.android.gms.common.api.GoogleApiClient, int, int, boolean)">getSelectOpponentsIntent</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, int minPlayers, int maxPlayers, boolean allowAutomatch)</nobr> |
| |
| <div class="jd-descrdiv">Returns an intent that will let the user select opponents to send an invitation to for a |
| turn based multiplayer match.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| Intent</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#getSelectOpponentsIntent(com.google.android.gms.common.api.GoogleApiClient, int, int)">getSelectOpponentsIntent</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, int minPlayers, int maxPlayers)</nobr> |
| |
| <div class="jd-descrdiv">Returns an intent that will let the user select opponents to send an invitation to for a |
| turn based multiplayer match.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| <a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeSocket.html">RealTimeSocket</a></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#getSocketForParticipant(com.google.android.gms.common.api.GoogleApiClient, java.lang.String, java.lang.String)">getSocketForParticipant</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, String roomId, String participantId)</nobr> |
| |
| <div class="jd-descrdiv">Returns a <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeSocket.html">RealTimeSocket</a></code> for carrying network traffic to the given peer.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| Intent</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#getWaitingRoomIntent(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.Room, int)">getWaitingRoomIntent</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, <a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html">Room</a> room, int minParticipantsToStart)</nobr> |
| |
| <div class="jd-descrdiv">Returns an intent that will display a "waiting room" screen that shows the progress of |
| participants joining a real-time multiplayer room.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#join(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RoomConfig)">join</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, <a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomConfig.html">RoomConfig</a> config)</nobr> |
| |
| <div class="jd-descrdiv">Join a real-time room by accepting an invitation.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#leave(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RoomUpdateListener, java.lang.String)">leave</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, <a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomUpdateListener.html">RoomUpdateListener</a> listener, String roomId)</nobr> |
| |
| <div class="jd-descrdiv">Leave the specified room.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| int</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#sendReliableMessage(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RealTimeMultiplayer.ReliableMessageSentCallback, byte[], java.lang.String, java.lang.String)">sendReliableMessage</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, <a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.ReliableMessageSentCallback.html">RealTimeMultiplayer.ReliableMessageSentCallback</a> listener, byte[] messageData, String roomId, String recipientParticipantId)</nobr> |
| |
| <div class="jd-descrdiv">Send a message to a participant in a real-time room reliably.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| int</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#sendUnreliableMessage(com.google.android.gms.common.api.GoogleApiClient, byte[], java.lang.String, java.lang.String)">sendUnreliableMessage</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, byte[] messageData, String roomId, String recipientParticipantId)</nobr> |
| |
| <div class="jd-descrdiv">Send a message to a participant in a real-time room.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class=" api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| int</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#sendUnreliableMessage(com.google.android.gms.common.api.GoogleApiClient, byte[], java.lang.String, java.util.List<java.lang.String>)">sendUnreliableMessage</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, byte[] messageData, String roomId, List<String> recipientParticipantIds)</nobr> |
| |
| <div class="jd-descrdiv">Send a message to one or more participants in a real-time room.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="alt-color api apilevel-" > |
| <td class="jd-typecol"><nobr> |
| abstract |
| |
| |
| |
| |
| int</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#sendUnreliableMessageToAll(com.google.android.gms.common.api.GoogleApiClient, byte[], java.lang.String)">sendUnreliableMessageToAll</a></span>(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, byte[] messageData, String roomId)</nobr> |
| |
| <div class="jd-descrdiv">Send a message to all participants in a real-time room.</div> |
| |
| </td></tr> |
| |
| |
| |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| </div><!-- jd-descr (summary) --> |
| |
| <!-- Details --> |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- XML Attributes --> |
| |
| |
| <!-- Enum Values --> |
| |
| |
| <!-- Constants --> |
| |
| |
| <!-- ========= ENUM CONSTANTS DETAIL ======== --> |
| <h2>Constants</h2> |
| |
| |
| |
| |
| <A NAME="REAL_TIME_MESSAGE_FAILED"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| static |
| final |
| int |
| </span> |
| REAL_TIME_MESSAGE_FAILED |
| </h4> |
| <div class="api-level"> |
| |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Return value indicating immediate failure. Returned by |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#sendUnreliableMessage(com.google.android.gms.common.api.GoogleApiClient, byte[], java.lang.String, java.lang.String)">sendUnreliableMessage(GoogleApiClient, byte[], String, String)</a></code> and |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#sendReliableMessage(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RealTimeMultiplayer.ReliableMessageSentCallback, byte[], java.lang.String, java.lang.String)">sendReliableMessage(GoogleApiClient, ReliableMessageSentCallback, byte[], String, String)</a></code> |
| methods when the message send operation failed due to an error. |
| </p></div> |
| |
| |
| <div class="jd-tagdata"> |
| <span class="jd-tagtitle">Constant Value: </span> |
| <span> |
| |
| -1 |
| (0xffffffff) |
| |
| </span> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| |
| |
| <!-- Fields --> |
| |
| |
| <!-- Public ctors --> |
| |
| |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <!-- Protected ctors --> |
| |
| |
| |
| <!-- ========= METHOD DETAIL ======== --> |
| <!-- Public methdos --> |
| |
| <h2>Public Methods</h2> |
| |
| |
| |
| <A NAME="create(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RoomConfig)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| void |
| </span> |
| <span class="sympad">create</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, <a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomConfig.html">RoomConfig</a> config)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Create a real-time room for the current game. The lifetime of the current game's connection |
| to the room is bound to this <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code>'s lifecycle. When the client |
| disconnects, the player will leave the room and any peer-to-peer connections for this player |
| will be torn down. The result is delivered by the callback |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomUpdateListener.html#onRoomCreated(int, com.google.android.gms.games.multiplayer.realtime.Room)">onRoomCreated(int, Room)</a></code> to the given RoomUpdateListener in the |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomConfig.html">RoomConfig</a></code>. The listener is called on the main thread. |
| <p> |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>config</td> |
| <td>The real-time room configuration. |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="declineInvitation(com.google.android.gms.common.api.GoogleApiClient, java.lang.String)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| void |
| </span> |
| <span class="sympad">declineInvitation</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, String invitationId)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Decline an invitation for a real-time room. |
| <p> |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>invitationId</td> |
| <td>The ID of the invitation to decline. |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="dismissInvitation(com.google.android.gms.common.api.GoogleApiClient, java.lang.String)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| void |
| </span> |
| <span class="sympad">dismissInvitation</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, String invitationId)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Dismiss an invitation to a real-time room. Dismissing an invitation will not change the state |
| of the room for the other participants. |
| <p> |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>invitationId</td> |
| <td>The ID of the invitation to dismiss. |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getSelectOpponentsIntent(com.google.android.gms.common.api.GoogleApiClient, int, int, boolean)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| Intent |
| </span> |
| <span class="sympad">getSelectOpponentsIntent</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, int minPlayers, int maxPlayers, boolean allowAutomatch)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Returns an intent that will let the user select opponents to send an invitation to for a |
| turn based multiplayer match. Note that this must be invoked with <code><a href="/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)">startActivityForResult(Intent, int)</a></code>, so that the identity of the calling package |
| can be established. |
| <p> |
| The number of players passed in should be the desired number of additional players to select, |
| not including the current player. So, for a game that can handle between 2 and 4 players, |
| <code>minPlayers</code> would be 1 and <code>maxPlayers</code> would be 3. |
| <p> |
| If the user canceled, the result will be <code><a href="/reference/android/app/Activity.html#RESULT_CANCELED">RESULT_CANCELED</a></code>. If the user |
| selected players, the result will be <code><a href="/reference/android/app/Activity.html#RESULT_OK">RESULT_OK</a></code>, and the data intent will |
| contain the selected player IDs in <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#EXTRA_PLAYERS">EXTRA_PLAYERS</a></code> and the minimum and |
| maximum numbers of additional auto-match players in |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#EXTRA_MIN_AUTOMATCH_PLAYERS">EXTRA_MIN_AUTOMATCH_PLAYERS</a></code> and |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#EXTRA_MAX_AUTOMATCH_PLAYERS">EXTRA_MAX_AUTOMATCH_PLAYERS</a></code> respectively. The player IDs in |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#EXTRA_PLAYERS">EXTRA_PLAYERS</a></code> will include only the other players selected, |
| not the current player. |
| <p> |
| If the <code>allowAutomatch</code> parameter is set to false, the UI will not display an option |
| for selecting automatch players. Set this to false if your game does not support |
| automatching. |
| <p> |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>minPlayers</td> |
| <td>The minimum number of players to select (not including the current player).</td> |
| </tr> |
| <tr> |
| <th>maxPlayers</td> |
| <td>The maximum number of players to select (not including the current player).</td> |
| </tr> |
| <tr> |
| <th>allowAutomatch</td> |
| <td>Whether or not to display an option for selecting automatch players.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>An <code><a href="/reference/android/content/Intent.html">Intent</a></code> that can be started to display the player selector.</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">See Also</h5> |
| <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#create(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RoomConfig)">create(GoogleApiClient, RoomConfig)</a></code></li> |
| </ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getSelectOpponentsIntent(com.google.android.gms.common.api.GoogleApiClient, int, int)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| Intent |
| </span> |
| <span class="sympad">getSelectOpponentsIntent</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, int minPlayers, int maxPlayers)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Returns an intent that will let the user select opponents to send an invitation to for a |
| turn based multiplayer match. Note that this must be invoked with <code><a href="/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)">startActivityForResult(Intent, int)</a></code>, so that the identity of the calling package |
| can be established. |
| <p> |
| The number of players passed in should be the desired number of additional players to select, |
| not including the current player. So, for a game that can handle between 2 and 4 players, |
| <code>minPlayers</code> would be 1 and <code>maxPlayers</code> would be 3. |
| <p> |
| If the user canceled, the result will be <code><a href="/reference/android/app/Activity.html#RESULT_CANCELED">RESULT_CANCELED</a></code>. If the user |
| selected players, the result will be <code><a href="/reference/android/app/Activity.html#RESULT_OK">RESULT_OK</a></code>, and the data intent will |
| contain the selected player IDs in <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#EXTRA_PLAYERS">EXTRA_PLAYERS</a></code> and the minimum and |
| maximum numbers of additional auto-match players in |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#EXTRA_MIN_AUTOMATCH_PLAYERS">EXTRA_MIN_AUTOMATCH_PLAYERS</a></code> and |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#EXTRA_MAX_AUTOMATCH_PLAYERS">EXTRA_MAX_AUTOMATCH_PLAYERS</a></code> respectively. The player IDs in |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#EXTRA_PLAYERS">EXTRA_PLAYERS</a></code> will include only the other players selected, |
| not the current player. |
| <p> |
| This method is the equivalent of calling |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#getSelectOpponentsIntent(com.google.android.gms.common.api.GoogleApiClient, int, int, boolean)">getSelectOpponentsIntent(GoogleApiClient, int, int, boolean)</a></code> with the |
| <code>allowAutomatch</code> parameter set to true. |
| <p> |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>minPlayers</td> |
| <td>The minimum number of players to select (not including the current player).</td> |
| </tr> |
| <tr> |
| <th>maxPlayers</td> |
| <td>The maximum number of players to select (not including the current player).</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>An <code><a href="/reference/android/content/Intent.html">Intent</a></code> that can be started to display the player selector.</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">See Also</h5> |
| <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#create(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RoomConfig)">create(GoogleApiClient, RoomConfig)</a></code></li> |
| </ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getSocketForParticipant(com.google.android.gms.common.api.GoogleApiClient, java.lang.String, java.lang.String)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| <a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeSocket.html">RealTimeSocket</a> |
| </span> |
| <span class="sympad">getSocketForParticipant</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, String roomId, String participantId)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Returns a <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeSocket.html">RealTimeSocket</a></code> for carrying network traffic to the given peer. Creates a |
| new socket if one does not exist (or if an existing socket gets disconnected). Requires an |
| active real-time room and players being available. Throws an <code><a href="/reference/java/lang/IllegalArgumentException.html">IllegalArgumentException</a></code> |
| if participantId is not a valid participant or belongs to the current player. |
| <p> |
| This method preserves datagram boundaries with the write() and read() calls and |
| guarantees in-order arrival of packets. |
| |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>roomId</td> |
| <td>ID of the room for which the socket is being bound.</td> |
| </tr> |
| <tr> |
| <th>participantId</td> |
| <td>The ID of the participant to whom this socket is bound</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>An instance of a LocalSocket, or null on error. |
| </li></ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getWaitingRoomIntent(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.Room, int)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| Intent |
| </span> |
| <span class="sympad">getWaitingRoomIntent</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, <a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html">Room</a> room, int minParticipantsToStart)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Returns an intent that will display a "waiting room" screen that shows the progress of |
| participants joining a real-time multiplayer room. Note that this must be invoked with |
| <code><a href="/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)">startActivityForResult(Intent, int)</a></code>, so that the identity of the calling |
| package can be established. |
| <p> |
| If the necessary number of peers have connected and it's now OK to start the game, or if the |
| user explicitly asked to start the game now, the activity result will be |
| <code><a href="/reference/android/app/Activity.html#RESULT_OK">RESULT_OK</a></code>. If the user bailed out of the waiting room screen without taking |
| any action, the result will be <code><a href="/reference/android/app/Activity.html#RESULT_CANCELED">RESULT_CANCELED</a></code>. If the user explicitly chose |
| to leave the room, the result will be <code><a href="/reference/com/google/android/gms/games/GamesActivityResultCodes.html#RESULT_LEFT_ROOM">RESULT_LEFT_ROOM</a></code>. |
| <p> |
| Regardless of what the result code was, the waiting room activity will return a data intent |
| containing a <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html">Room</a></code> object in <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#EXTRA_ROOM">EXTRA_ROOM</a></code> that represents the |
| current state of the Room that you originally passed as a parameter here. |
| <p> |
| If desired, the waiting room can allow the user to start playing the game even before the |
| room is fully connected. This is controlled by the <code>minParticipantsToStart</code> parameter: |
| if at least that many participants (including the current player) are connected to the room, |
| a "Start playing" menu item will become enabled in the waiting room UI. Setting |
| <code>minParticipantsToStart</code> to 0 means that "Start playing" will always be available, and |
| a value of <code><a href="/reference/java/lang/Integer.html#MAX_VALUE">MAX_VALUE</a></code> will disable the item completely. Note: if you do allow |
| the user to start early, you'll need to handle that situation by explicitly telling the other |
| connected peers that the game is now starting; see the developer documentation for more |
| details. |
| <p> |
| Finally, note that the waiting room itself will never explicitly take any action to change |
| the state of the room or its participants. So if the activity result is |
| <code><a href="/reference/com/google/android/gms/games/GamesActivityResultCodes.html#RESULT_LEFT_ROOM">RESULT_LEFT_ROOM</a></code>, it's the caller's responsibility to |
| actually leave the room. Or if the result is <code><a href="/reference/android/app/Activity.html#RESULT_CANCELED">RESULT_CANCELED</a></code>, it's the |
| responsibility of the caller to double-check the current state of the Room and decide whether |
| to start the game, keep waiting, or do something else. But note that while the waiting room |
| is active, the state of the Room <strong>will</strong> change as participants accept or |
| decline invitations, and the number of participants may even change as auto-match players get |
| added. |
| <p> |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>room</td> |
| <td>The <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/Room.html">Room</a></code> object to be displayed.</td> |
| </tr> |
| <tr> |
| <th>minParticipantsToStart</td> |
| <td>the minimum number of participants that must be connected to |
| the room (including the current player) for the "Start playing" menu item to |
| become enabled.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>An <code><a href="/reference/android/content/Intent.html">Intent</a></code> that can be started to display the waiting room screen.</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">See Also</h5> |
| <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#create(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RoomConfig)">create(GoogleApiClient, RoomConfig)</a></code></li><li><code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#leave(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RoomUpdateListener, java.lang.String)">leave(GoogleApiClient, RoomUpdateListener, String)</a></code></li> |
| </ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="join(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RoomConfig)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| void |
| </span> |
| <span class="sympad">join</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, <a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomConfig.html">RoomConfig</a> config)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Join a real-time room by accepting an invitation. The lifetime of the current game's |
| connection to the room is bound to this <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code>'s lifecycle. When the client |
| disconnects, the player will leave the room and any peer-to-peer connections for this player |
| will be torn down. The result is delivered by the callback |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomUpdateListener.html#onJoinedRoom(int, com.google.android.gms.games.multiplayer.realtime.Room)">onJoinedRoom(int, Room)</a></code> to the given RoomUpdateListener in the |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomConfig.html">RoomConfig</a></code>. The listener is called on the main thread. |
| <p> |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>config</td> |
| <td>The real-time room configuration. |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="leave(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RoomUpdateListener, java.lang.String)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| void |
| </span> |
| <span class="sympad">leave</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, <a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomUpdateListener.html">RoomUpdateListener</a> listener, String roomId)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Leave the specified room. This will disconnect the player from the room, but allow other |
| players to continue playing the game. The result is delivered by the callback |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomUpdateListener.html#onLeftRoom(int, java.lang.String)">onLeftRoom(int, String)</a></code> to the given listener on the main thread. |
| <p> |
| After this method is called, you cannot perform any further actions on the room. You can |
| create or join another room only after <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RoomUpdateListener.html#onLeftRoom(int, java.lang.String)">onLeftRoom(int, String)</a></code> is received. |
| <p> |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>listener</td> |
| <td>The listener that is notified after the room has been left. The listener is |
| called on the main thread.</td> |
| </tr> |
| <tr> |
| <th>roomId</td> |
| <td>ID of the room to leave. |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="sendReliableMessage(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.games.multiplayer.realtime.RealTimeMultiplayer.ReliableMessageSentCallback, byte[], java.lang.String, java.lang.String)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| int |
| </span> |
| <span class="sympad">sendReliableMessage</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, <a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.ReliableMessageSentCallback.html">RealTimeMultiplayer.ReliableMessageSentCallback</a> listener, byte[] messageData, String roomId, String recipientParticipantId)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Send a message to a participant in a real-time room reliably. The caller will receive a |
| callback to report the status of the send message operation. Throws an |
| <code><a href="/reference/java/lang/IllegalArgumentException.html">IllegalArgumentException</a></code> if recipientParticipantId is not a valid participant or |
| belongs to the current player. The maximum message size supported is |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#MAX_RELIABLE_MESSAGE_LEN">MAX_RELIABLE_MESSAGE_LEN</a></code> bytes. |
| <p> |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>listener</td> |
| <td>The listener that is notified when the message has been sent.</td> |
| </tr> |
| <tr> |
| <th>messageData</td> |
| <td>The message to be sent. Should be at most |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#MAX_RELIABLE_MESSAGE_LEN">MAX_RELIABLE_MESSAGE_LEN</a></code> bytes.</td> |
| </tr> |
| <tr> |
| <th>roomId</td> |
| <td>ID of the room for which the message is being sent.</td> |
| </tr> |
| <tr> |
| <th>recipientParticipantId</td> |
| <td>The participant ID to send the message to.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>The token for the message sent, which is returned in callback |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.ReliableMessageSentCallback.html#onRealTimeMessageSent(int, int, java.lang.String)">onRealTimeMessageSent(int, int, String)</a></code>, or |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#REAL_TIME_MESSAGE_FAILED">REAL_TIME_MESSAGE_FAILED</a></code> if the message failed to send. |
| </li></ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="sendUnreliableMessage(com.google.android.gms.common.api.GoogleApiClient, byte[], java.lang.String, java.lang.String)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| int |
| </span> |
| <span class="sympad">sendUnreliableMessage</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, byte[] messageData, String roomId, String recipientParticipantId)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Send a message to a participant in a real-time room. The message delivery is not reliable and |
| will not report status after completion. Throws an <code><a href="/reference/java/lang/IllegalArgumentException.html">IllegalArgumentException</a></code> if |
| recipientParticipantId is not a valid participant or belongs to the current player. The |
| maximum message size supported is <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#MAX_UNRELIABLE_MESSAGE_LEN">MAX_UNRELIABLE_MESSAGE_LEN</a></code> bytes. |
| <p> |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>messageData</td> |
| <td>The message to be sent. Should be at most |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#MAX_UNRELIABLE_MESSAGE_LEN">MAX_UNRELIABLE_MESSAGE_LEN</a></code> bytes.</td> |
| </tr> |
| <tr> |
| <th>roomId</td> |
| <td>ID of the room for which the message is being sent.</td> |
| </tr> |
| <tr> |
| <th>recipientParticipantId</td> |
| <td>The participant ID to send the message to.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/games/GamesStatusCodes.html#STATUS_OK">STATUS_OK</a></code> on a successful attempt, |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#REAL_TIME_MESSAGE_FAILED">REAL_TIME_MESSAGE_FAILED</a></code> if the message failed to send. |
| </li></ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="sendUnreliableMessage(com.google.android.gms.common.api.GoogleApiClient, byte[], java.lang.String, java.util.List<java.lang.String>)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| int |
| </span> |
| <span class="sympad">sendUnreliableMessage</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, byte[] messageData, String roomId, List<String> recipientParticipantIds)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Send a message to one or more participants in a real-time room. The message delivery is not |
| reliable and will not report status after completion. Throws an |
| <code><a href="/reference/java/lang/IllegalArgumentException.html">IllegalArgumentException</a></code> if any participants in recipientParticipantIds are not valid |
| or belong to the current player. The maximum message size supported is |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#MAX_UNRELIABLE_MESSAGE_LEN">MAX_UNRELIABLE_MESSAGE_LEN</a></code> bytes. |
| <p> |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>messageData</td> |
| <td>The message to be sent. Should be at most |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#MAX_UNRELIABLE_MESSAGE_LEN">MAX_UNRELIABLE_MESSAGE_LEN</a></code> bytes.</td> |
| </tr> |
| <tr> |
| <th>roomId</td> |
| <td>ID of the room for which the message is being sent.</td> |
| </tr> |
| <tr> |
| <th>recipientParticipantIds</td> |
| <td>One or more participant IDs to send the message to.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/games/GamesStatusCodes.html#STATUS_OK">STATUS_OK</a></code> on a successful attempt, |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#REAL_TIME_MESSAGE_FAILED">REAL_TIME_MESSAGE_FAILED</a></code> if the message failed to send. |
| </li></ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="sendUnreliableMessageToAll(com.google.android.gms.common.api.GoogleApiClient, byte[], java.lang.String)"></A> |
| |
| <div class="jd-details api apilevel-"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| abstract |
| |
| int |
| </span> |
| <span class="sympad">sendUnreliableMessageToAll</span> |
| <span class="normal">(<a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a> apiClient, byte[] messageData, String roomId)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Send a message to all participants in a real-time room. The message delivery is not reliable |
| and will not report status after completion. The maximum message size supported is |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#MAX_UNRELIABLE_MESSAGE_LEN">MAX_UNRELIABLE_MESSAGE_LEN</a></code> bytes. |
| <p> |
| Required API: <code><a href="/reference/com/google/android/gms/games/Games.html#API">API</a></code><br> |
| Required Scopes: <code><a href="/reference/com/google/android/gms/games/Games.html#SCOPE_GAMES">SCOPE_GAMES</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>apiClient</td> |
| <td>The <code><a href="/reference/com/google/android/gms/common/api/GoogleApiClient.html">GoogleApiClient</a></code> to service the call.</td> |
| </tr> |
| <tr> |
| <th>messageData</td> |
| <td>The message to be sent. Should be at most |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/Multiplayer.html#MAX_UNRELIABLE_MESSAGE_LEN">MAX_UNRELIABLE_MESSAGE_LEN</a></code> bytes.</td> |
| </tr> |
| <tr> |
| <th>roomId</td> |
| <td>ID of the room for which the message is being sent.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li><code><a href="/reference/com/google/android/gms/games/GamesStatusCodes.html#STATUS_OK">STATUS_OK</a></code> on a successful attempt, |
| <code><a href="/reference/com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer.html#REAL_TIME_MESSAGE_FAILED">REAL_TIME_MESSAGE_FAILED</a></code> if the message failed to send. |
| </li></ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| |
| |
| |
| <!-- ========= METHOD DETAIL ======== --> |
| |
| |
| |
| <!-- ========= END OF CLASS DATA ========= --> |
| <A NAME="navbar_top"></A> |
| |
| <div id="footer" class="wrap" > |
| |
| |
| <div id="copyright"> |
| |
| Except as noted, this content is licensed under <a |
| href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. |
| For details and restrictions, see the <a href="/license.html"> |
| Content License</a>. |
| </div> |
| <div id="build_info"> |
| |
| <script src="/timestamp.js" type="text/javascript"></script> |
| <script>document.write(BUILD_TIMESTAMP)</script> |
| |
| </div> |
| |
| |
| <div id="footerlinks"> |
| |
| <p> |
| <a href="/about/index.html">About Android</a> | |
| <a href="/legal.html">Legal</a> | |
| <a href="/support.html">Support</a> |
| </p> |
| </div> |
| |
| </div> <!-- end footer --> |
| </div> <!-- jd-content --> |
| |
| </div><!-- end doc-content --> |
| |
| </div> <!-- end body-content --> |
| |
| |
| |
| |
| |
| |
| </body> |
| </html> |