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>CastMediaControlIntent | 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"> </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 & Retain</a></li> 414 <li><a href="/distribute/monetize/index.html">Monetize</a></li> 415 <li><a href="/distribute/tools/index.html">Tools & 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">CastMediaControlIntent</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<div class="sum-details-links"> 789 790Summary: 791 792 793 794 795 796 <a href="#constants">Constants</a> 797 798 799 800 801 802 803 804 805 | <a href="#pubmethods">Methods</a> 806 807 808 809 810 | <a href="#inhmethods">Inherited Methods</a> 811 812| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> 813 814</div><!-- end sum-details-links --> 815<div class="api-level"> 816 817 818 819 820</div> 821</div><!-- end api-info-block --> 822 823 824<!-- ======== START OF CLASS DATA ======== --> 825 826<div id="jd-header"> 827 public 828 829 final 830 831 class 832<h1 itemprop="name">CastMediaControlIntent</h1> 833 834 835 836 837 extends Object<br/> 838 839 840 841 842 843 844 845 846 847 848 849 850</div><!-- end header --> 851 852<div id="naMessage"></div> 853 854<div id="jd-content" class="api apilevel-"> 855<table class="jd-inheritance-table"> 856 857 858 <tr> 859 860 <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td> 861 </tr> 862 863 864 <tr> 865 866 <td class="jd-inheritance-space"> ↳</td> 867 868 <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gms.cast.CastMediaControlIntent</td> 869 </tr> 870 871 872</table> 873 874 875 876 877 878 879 880<div class="jd-descr"> 881 882 883<h2>Class Overview</h2> 884<p itemprop="articleBody">Intent constants for use with the Cast MediaRouteProvider. This class also contains utility 885 methods for creating a control category for discovering Cast media routes that support a specific 886 app and/or set of namespaces, to be used with MediaRouteSelector. 887 888</p> 889 890 891 892 893 894</div><!-- jd-descr --> 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911<div class="jd-descr"> 912 913 914<h2>Summary</h2> 915 916 917 918 919 920 921 922 923 924 925 926 927 928<!-- =========== ENUM CONSTANT SUMMARY =========== --> 929<table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr> 930 931 932 933 <tr class="alt-color api apilevel-" > 934 <td class="jd-typecol">String</td> 935 <td class="jd-linkcol"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#ACTION_SYNC_STATUS">ACTION_SYNC_STATUS</a></td> 936 <td class="jd-descrcol" width="100%"> 937 A Cast extension action for requesting the current media status when the current item ID is 938 not known to the client application. 939 940 941 942 </td> 943 </tr> 944 945 946 <tr class=" api apilevel-" > 947 <td class="jd-typecol">String</td> 948 <td class="jd-linkcol"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#CATEGORY_CAST">CATEGORY_CAST</a></td> 949 <td class="jd-descrcol" width="100%"> 950 <em> 951 This constant is deprecated. 952 use <code><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#categoryForCast(java.lang.String)">categoryForCast(String)</a></code> instead. 953</em> 954 955 956 957 </td> 958 </tr> 959 960 961 <tr class="alt-color api apilevel-" > 962 <td class="jd-typecol">String</td> 963 <td class="jd-linkcol"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#DEFAULT_MEDIA_RECEIVER_APPLICATION_ID">DEFAULT_MEDIA_RECEIVER_APPLICATION_ID</a></td> 964 <td class="jd-descrcol" width="100%"> 965 The application ID for the Cast Default Media Receiver. 966 967 968 969 </td> 970 </tr> 971 972 973 <tr class=" api apilevel-" > 974 <td class="jd-typecol">int</td> 975 <td class="jd-linkcol"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#ERROR_CODE_REQUEST_FAILED">ERROR_CODE_REQUEST_FAILED</a></td> 976 <td class="jd-descrcol" width="100%"> 977 An error code indicating that a Cast request has failed. 978 979 980 981 </td> 982 </tr> 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/cast/CastMediaControlIntent.html#ERROR_CODE_SESSION_START_FAILED">ERROR_CODE_SESSION_START_FAILED</a></td> 988 <td class="jd-descrcol" width="100%"> 989 An error code indicating that the request could not be processed because the session could 990 not be started. 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/cast/CastMediaControlIntent.html#ERROR_CODE_TEMPORARILY_DISCONNECTED">ERROR_CODE_TEMPORARILY_DISCONNECTED</a></td> 1001 <td class="jd-descrcol" width="100%"> 1002 An error code indicating that the connection to the Cast device has been lost, but the system 1003 is actively trying to re-establish the connection. 1004 1005 1006 1007 </td> 1008 </tr> 1009 1010 1011 <tr class="alt-color api apilevel-" > 1012 <td class="jd-typecol">String</td> 1013 <td class="jd-linkcol"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#EXTRA_CAST_APPLICATION_ID">EXTRA_CAST_APPLICATION_ID</a></td> 1014 <td class="jd-descrcol" width="100%"> 1015 The extra that contains the ID of the application to launch for an 1016 <code><a href="https://developer.android.com/reference/android/support/v7/media/MediaControlIntent.html#ACTION_START_SESSION">ACTION_START_SESSION</a></code> 1017 request. 1018 1019 1020 1021 </td> 1022 </tr> 1023 1024 1025 <tr class=" api apilevel-" > 1026 <td class="jd-typecol">String</td> 1027 <td class="jd-linkcol"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#EXTRA_CAST_LANGUAGE_CODE">EXTRA_CAST_LANGUAGE_CODE</a></td> 1028 <td class="jd-descrcol" width="100%"> 1029 The extra that indicates the language to be used by the receiver application. 1030 1031 1032 1033 </td> 1034 </tr> 1035 1036 1037 <tr class="alt-color api apilevel-" > 1038 <td class="jd-typecol">String</td> 1039 <td class="jd-linkcol"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#EXTRA_CAST_RELAUNCH_APPLICATION">EXTRA_CAST_RELAUNCH_APPLICATION</a></td> 1040 <td class="jd-descrcol" width="100%"> 1041 The extra that indicates whether the application should be relaunched if it is already 1042 running (the default behavior) or whether an attempt should be made to join the application 1043 first. 1044 1045 1046 1047 </td> 1048 </tr> 1049 1050 1051 <tr class=" api apilevel-" > 1052 <td class="jd-typecol">String</td> 1053 <td class="jd-linkcol"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#EXTRA_CAST_STOP_APPLICATION_WHEN_SESSION_ENDS">EXTRA_CAST_STOP_APPLICATION_WHEN_SESSION_ENDS</a></td> 1054 <td class="jd-descrcol" width="100%"> 1055 The extra that indicates that the receiver application should be stopped when the session 1056 ends. 1057 1058 1059 1060 </td> 1061 </tr> 1062 1063 1064 <tr class="alt-color api apilevel-" > 1065 <td class="jd-typecol">String</td> 1066 <td class="jd-linkcol"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#EXTRA_CUSTOM_DATA">EXTRA_CUSTOM_DATA</a></td> 1067 <td class="jd-descrcol" width="100%"> 1068 The extra that contains a compact JSON string of custom data to pass with a media request. 1069 1070 1071 1072 </td> 1073 </tr> 1074 1075 1076 <tr class=" api apilevel-" > 1077 <td class="jd-typecol">String</td> 1078 <td class="jd-linkcol"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#EXTRA_DEBUG_LOGGING_ENABLED">EXTRA_DEBUG_LOGGING_ENABLED</a></td> 1079 <td class="jd-descrcol" width="100%"> 1080 The extra that indicates whether debug logging should be enabled for the Cast session. 1081 1082 1083 1084 </td> 1085 </tr> 1086 1087 1088 <tr class="alt-color api apilevel-" > 1089 <td class="jd-typecol">String</td> 1090 <td class="jd-linkcol"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#EXTRA_ERROR_CODE">EXTRA_ERROR_CODE</a></td> 1091 <td class="jd-descrcol" width="100%"> 1092 An error bundle extra for the error code. 1093 1094 1095 1096 </td> 1097 </tr> 1098 1099 1100 1101</table> 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118<!-- ========== METHOD SUMMARY =========== --> 1119<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> 1120 1121 1122 1123 1124 <tr class="alt-color api apilevel-" > 1125 <td class="jd-typecol"><nobr> 1126 1127 1128 1129 static 1130 1131 String</nobr> 1132 </td> 1133 <td class="jd-linkcol" width="100%"><nobr> 1134 <span class="sympad"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#categoryForCast(java.lang.String)">categoryForCast</a></span>(String applicationId)</nobr> 1135 1136 <div class="jd-descrdiv"> 1137 Returns a custom control category for discovering Cast devices that support running the 1138 specified app, independent of whether the app is running or not. 1139 1140 1141 1142 </div> 1143 1144 </td></tr> 1145 1146 1147 1148 <tr class=" api apilevel-" > 1149 <td class="jd-typecol"><nobr> 1150 1151 1152 1153 static 1154 1155 String</nobr> 1156 </td> 1157 <td class="jd-linkcol" width="100%"><nobr> 1158 <span class="sympad"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#categoryForCast(java.lang.String, java.util.Collection<java.lang.String>)">categoryForCast</a></span>(String applicationId, Collection<String> namespaces)</nobr> 1159 1160 <div class="jd-descrdiv"> 1161 Returns a custom control category for discovering Cast devices meeting <em>both</em> 1162 application ID and namespace restrictions. 1163 1164 1165 1166 </div> 1167 1168 </td></tr> 1169 1170 1171 1172 <tr class="alt-color api apilevel-" > 1173 <td class="jd-typecol"><nobr> 1174 1175 1176 1177 static 1178 1179 String</nobr> 1180 </td> 1181 <td class="jd-linkcol" width="100%"><nobr> 1182 <span class="sympad"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#categoryForCast(java.util.Collection<java.lang.String>)">categoryForCast</a></span>(Collection<String> namespaces)</nobr> 1183 1184 <div class="jd-descrdiv"> 1185 Returns a custom control category for discovering Cast devices currently running an 1186 application which supports the specified namespaces. 1187 1188 1189 1190 </div> 1191 1192 </td></tr> 1193 1194 1195 1196 <tr class=" api apilevel-" > 1197 <td class="jd-typecol"><nobr> 1198 1199 1200 1201 static 1202 1203 String</nobr> 1204 </td> 1205 <td class="jd-linkcol" width="100%"><nobr> 1206 <span class="sympad"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#categoryForRemotePlayback(java.lang.String)">categoryForRemotePlayback</a></span>(String applicationId)</nobr> 1207 1208 <div class="jd-descrdiv"> 1209 Returns a custom control category for discovering Cast devices which support the default 1210 Android remote playback actions using the specified Cast player. 1211 1212 1213 1214 </div> 1215 1216 </td></tr> 1217 1218 1219 1220 <tr class="alt-color api apilevel-" > 1221 <td class="jd-typecol"><nobr> 1222 1223 1224 1225 static 1226 1227 String</nobr> 1228 </td> 1229 <td class="jd-linkcol" width="100%"><nobr> 1230 <span class="sympad"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#categoryForRemotePlayback()">categoryForRemotePlayback</a></span>()</nobr> 1231 1232 <div class="jd-descrdiv"> 1233 Returns a custom control category for discovering Cast devices which support the Default 1234 Media Receiver. 1235 1236 1237 1238 </div> 1239 1240 </td></tr> 1241 1242 1243 1244 <tr class=" api apilevel-" > 1245 <td class="jd-typecol"><nobr> 1246 1247 1248 1249 static 1250 1251 String</nobr> 1252 </td> 1253 <td class="jd-linkcol" width="100%"><nobr> 1254 <span class="sympad"><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#languageTagForLocale(java.util.Locale)">languageTagForLocale</a></span>(Locale locale)</nobr> 1255 1256 <div class="jd-descrdiv"> 1257 Returns an RFC-5646 language tag string fo the given locale. 1258 1259 1260 1261 </div> 1262 1263 </td></tr> 1264 1265 1266 1267</table> 1268 1269 1270 1271 1272 1273 1274 1275<!-- ========== METHOD SUMMARY =========== --> 1276<table id="inhmethods" class="jd-sumtable"><tr><th> 1277 <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> 1278 <div style="clear:left;">Inherited Methods</div></th></tr> 1279 1280 1281<tr class="api apilevel-" > 1282<td colspan="12"> 1283 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" 1284 ><img id="inherited-methods-java.lang.Object-trigger" 1285 src="/assets/images/triangle-closed.png" 1286 class="jd-expando-trigger-img" /></a> 1287From class 1288 1289 java.lang.Object 1290 1291<div id="inherited-methods-java.lang.Object"> 1292 <div id="inherited-methods-java.lang.Object-list" 1293 class="jd-inheritedlinks"> 1294 </div> 1295 <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> 1296 <table class="jd-sumtable-expando"> 1297 1298 1299 1300 1301 <tr class="alt-color api apilevel-" > 1302 <td class="jd-typecol"><nobr> 1303 1304 1305 1306 1307 1308 Object</nobr> 1309 </td> 1310 <td class="jd-linkcol" width="100%"><nobr> 1311 <span class="sympad">clone</span>()</nobr> 1312 1313 </td></tr> 1314 1315 1316 1317 <tr class=" api apilevel-" > 1318 <td class="jd-typecol"><nobr> 1319 1320 1321 1322 1323 1324 boolean</nobr> 1325 </td> 1326 <td class="jd-linkcol" width="100%"><nobr> 1327 <span class="sympad">equals</span>(Object arg0)</nobr> 1328 1329 </td></tr> 1330 1331 1332 1333 <tr class="alt-color api apilevel-" > 1334 <td class="jd-typecol"><nobr> 1335 1336 1337 1338 1339 1340 void</nobr> 1341 </td> 1342 <td class="jd-linkcol" width="100%"><nobr> 1343 <span class="sympad">finalize</span>()</nobr> 1344 1345 </td></tr> 1346 1347 1348 1349 <tr class=" api apilevel-" > 1350 <td class="jd-typecol"><nobr> 1351 1352 1353 final 1354 1355 1356 Class<?></nobr> 1357 </td> 1358 <td class="jd-linkcol" width="100%"><nobr> 1359 <span class="sympad">getClass</span>()</nobr> 1360 1361 </td></tr> 1362 1363 1364 1365 <tr class="alt-color api apilevel-" > 1366 <td class="jd-typecol"><nobr> 1367 1368 1369 1370 1371 1372 int</nobr> 1373 </td> 1374 <td class="jd-linkcol" width="100%"><nobr> 1375 <span class="sympad">hashCode</span>()</nobr> 1376 1377 </td></tr> 1378 1379 1380 1381 <tr class=" api apilevel-" > 1382 <td class="jd-typecol"><nobr> 1383 1384 1385 final 1386 1387 1388 void</nobr> 1389 </td> 1390 <td class="jd-linkcol" width="100%"><nobr> 1391 <span class="sympad">notify</span>()</nobr> 1392 1393 </td></tr> 1394 1395 1396 1397 <tr class="alt-color api apilevel-" > 1398 <td class="jd-typecol"><nobr> 1399 1400 1401 final 1402 1403 1404 void</nobr> 1405 </td> 1406 <td class="jd-linkcol" width="100%"><nobr> 1407 <span class="sympad">notifyAll</span>()</nobr> 1408 1409 </td></tr> 1410 1411 1412 1413 <tr class=" api apilevel-" > 1414 <td class="jd-typecol"><nobr> 1415 1416 1417 1418 1419 1420 String</nobr> 1421 </td> 1422 <td class="jd-linkcol" width="100%"><nobr> 1423 <span class="sympad">toString</span>()</nobr> 1424 1425 </td></tr> 1426 1427 1428 1429 <tr class="alt-color api apilevel-" > 1430 <td class="jd-typecol"><nobr> 1431 1432 1433 final 1434 1435 1436 void</nobr> 1437 </td> 1438 <td class="jd-linkcol" width="100%"><nobr> 1439 <span class="sympad">wait</span>()</nobr> 1440 1441 </td></tr> 1442 1443 1444 1445 <tr class=" api apilevel-" > 1446 <td class="jd-typecol"><nobr> 1447 1448 1449 final 1450 1451 1452 void</nobr> 1453 </td> 1454 <td class="jd-linkcol" width="100%"><nobr> 1455 <span class="sympad">wait</span>(long arg0, int arg1)</nobr> 1456 1457 </td></tr> 1458 1459 1460 1461 <tr class="alt-color api apilevel-" > 1462 <td class="jd-typecol"><nobr> 1463 1464 1465 final 1466 1467 1468 void</nobr> 1469 </td> 1470 <td class="jd-linkcol" width="100%"><nobr> 1471 <span class="sympad">wait</span>(long arg0)</nobr> 1472 1473 </td></tr> 1474 1475 1476</table> 1477 </div> 1478</div> 1479</td></tr> 1480 1481 1482</table> 1483 1484 1485</div><!-- jd-descr (summary) --> 1486 1487<!-- Details --> 1488 1489 1490 1491 1492 1493 1494 1495 1496<!-- XML Attributes --> 1497 1498 1499<!-- Enum Values --> 1500 1501 1502<!-- Constants --> 1503 1504 1505<!-- ========= ENUM CONSTANTS DETAIL ======== --> 1506<h2>Constants</h2> 1507 1508 1509 1510 1511<A NAME="ACTION_SYNC_STATUS"></A> 1512 1513<div class="jd-details api apilevel-"> 1514 <h4 class="jd-details-title"> 1515 <span class="normal"> 1516 public 1517 static 1518 final 1519 String 1520 </span> 1521 ACTION_SYNC_STATUS 1522 </h4> 1523 <div class="api-level"> 1524 1525 1526 1527 1528 </div> 1529 <div class="jd-details-descr"> 1530 1531 1532 1533 1534 <div class="jd-tagdata jd-tagdescr"><p>A Cast extension action for requesting the current media status when the current item ID is 1535 not known to the client application. 1536 <p> 1537 The extra <code><a href="https://developer.android.com/reference/android/support/v7/media/MediaControlIntent.html#EXTRA_SESSION_ID">EXTRA_SESSION_ID</a></code> 1538 must be supplied in the request. The request will fail with an error if the current session 1539 does not match this session ID, or if there is no current session. 1540 <p> 1541 The extra <code><a href="https://developer.android.com/reference/android/support/v7/media/MediaControlIntent.html#EXTRA_ITEM_STATUS_UPDATE_RECEIVER">EXTRA_ITEM_STATUS_UPDATE_RECEIVER</a></code> 1542 may optionally be supplied in the request to attach an update receiver for the current media 1543 item, if there is any. 1544 <p> 1545 If any media is currently loaded, the result intent will contain the extras 1546 <code><a href="https://developer.android.com/reference/android/support/v7/media/MediaControlIntent.html#EXTRA_ITEM_ID">EXTRA_ITEM_ID</a></code>, 1547 <code><a href="https://developer.android.com/reference/android/support/v7/media/MediaControlIntent.html#EXTRA_ITEM_STATUS">EXTRA_ITEM_STATUS</a></code>, and 1548 <code><a href="https://developer.android.com/reference/android/support/v7/media/MediaControlIntent.html#EXTRA_ITEM_METADATA">EXTRA_ITEM_METADATA</a></code>. 1549 Otherwise, the result intent will be empty. 1550</p></div> 1551 1552 1553 <div class="jd-tagdata"> 1554 <span class="jd-tagtitle">Constant Value: </span> 1555 <span> 1556 1557 "com.google.android.gms.cast.ACTION_SYNC_STATUS" 1558 1559 </span> 1560 </div> 1561 1562 </div> 1563</div> 1564 1565 1566 1567<A NAME="CATEGORY_CAST"></A> 1568 1569<div class="jd-details api apilevel-"> 1570 <h4 class="jd-details-title"> 1571 <span class="normal"> 1572 public 1573 static 1574 final 1575 String 1576 </span> 1577 CATEGORY_CAST 1578 </h4> 1579 <div class="api-level"> 1580 1581 1582 1583 1584 </div> 1585 <div class="jd-details-descr"> 1586 1587 1588 1589 <p> 1590 <p class="caution"><strong> 1591 This constant is deprecated.</strong><br/> 1592 use <code><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#categoryForCast(java.lang.String)">categoryForCast(String)</a></code> instead. 1593 1594 </p> 1595 <div class="jd-tagdata jd-tagdescr"><p>A control category for discovering Cast devices. When used as-is, matches any Cast device, 1596 independent of app or namespace support. For restricting Cast devices by app and/or 1597 namespaces support, use <code><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#categoryForCast(java.lang.String)">categoryForCast(String)</a></code>.</p></div> 1598 1599 1600 <div class="jd-tagdata"> 1601 <span class="jd-tagtitle">Constant Value: </span> 1602 <span> 1603 1604 "com.google.android.gms.cast.CATEGORY_CAST" 1605 1606 </span> 1607 </div> 1608 1609 </div> 1610</div> 1611 1612 1613 1614<A NAME="DEFAULT_MEDIA_RECEIVER_APPLICATION_ID"></A> 1615 1616<div class="jd-details api apilevel-"> 1617 <h4 class="jd-details-title"> 1618 <span class="normal"> 1619 public 1620 static 1621 final 1622 String 1623 </span> 1624 DEFAULT_MEDIA_RECEIVER_APPLICATION_ID 1625 </h4> 1626 <div class="api-level"> 1627 1628 1629 1630 1631 </div> 1632 <div class="jd-details-descr"> 1633 1634 1635 1636 1637 <div class="jd-tagdata jd-tagdescr"><p>The application ID for the Cast Default Media Receiver. 1638</p></div> 1639 1640 1641 <div class="jd-tagdata"> 1642 <span class="jd-tagtitle">Constant Value: </span> 1643 <span> 1644 1645 "CC1AD845" 1646 1647 </span> 1648 </div> 1649 1650 </div> 1651</div> 1652 1653 1654 1655<A NAME="ERROR_CODE_REQUEST_FAILED"></A> 1656 1657<div class="jd-details api apilevel-"> 1658 <h4 class="jd-details-title"> 1659 <span class="normal"> 1660 public 1661 static 1662 final 1663 int 1664 </span> 1665 ERROR_CODE_REQUEST_FAILED 1666 </h4> 1667 <div class="api-level"> 1668 1669 1670 1671 1672 </div> 1673 <div class="jd-details-descr"> 1674 1675 1676 1677 1678 <div class="jd-tagdata jd-tagdescr"><p>An error code indicating that a Cast request has failed. 1679</p></div> 1680 1681 1682 <div class="jd-tagdata"> 1683 <span class="jd-tagtitle">Constant Value: </span> 1684 <span> 1685 1686 1 1687 (0x00000001) 1688 1689 </span> 1690 </div> 1691 1692 </div> 1693</div> 1694 1695 1696 1697<A NAME="ERROR_CODE_SESSION_START_FAILED"></A> 1698 1699<div class="jd-details api apilevel-"> 1700 <h4 class="jd-details-title"> 1701 <span class="normal"> 1702 public 1703 static 1704 final 1705 int 1706 </span> 1707 ERROR_CODE_SESSION_START_FAILED 1708 </h4> 1709 <div class="api-level"> 1710 1711 1712 1713 1714 </div> 1715 <div class="jd-details-descr"> 1716 1717 1718 1719 1720 <div class="jd-tagdata jd-tagdescr"><p>An error code indicating that the request could not be processed because the session could 1721 not be started. 1722</p></div> 1723 1724 1725 <div class="jd-tagdata"> 1726 <span class="jd-tagtitle">Constant Value: </span> 1727 <span> 1728 1729 2 1730 (0x00000002) 1731 1732 </span> 1733 </div> 1734 1735 </div> 1736</div> 1737 1738 1739 1740<A NAME="ERROR_CODE_TEMPORARILY_DISCONNECTED"></A> 1741 1742<div class="jd-details api apilevel-"> 1743 <h4 class="jd-details-title"> 1744 <span class="normal"> 1745 public 1746 static 1747 final 1748 int 1749 </span> 1750 ERROR_CODE_TEMPORARILY_DISCONNECTED 1751 </h4> 1752 <div class="api-level"> 1753 1754 1755 1756 1757 </div> 1758 <div class="jd-details-descr"> 1759 1760 1761 1762 1763 <div class="jd-tagdata jd-tagdescr"><p>An error code indicating that the connection to the Cast device has been lost, but the system 1764 is actively trying to re-establish the connection. 1765</p></div> 1766 1767 1768 <div class="jd-tagdata"> 1769 <span class="jd-tagtitle">Constant Value: </span> 1770 <span> 1771 1772 3 1773 (0x00000003) 1774 1775 </span> 1776 </div> 1777 1778 </div> 1779</div> 1780 1781 1782 1783<A NAME="EXTRA_CAST_APPLICATION_ID"></A> 1784 1785<div class="jd-details api apilevel-"> 1786 <h4 class="jd-details-title"> 1787 <span class="normal"> 1788 public 1789 static 1790 final 1791 String 1792 </span> 1793 EXTRA_CAST_APPLICATION_ID 1794 </h4> 1795 <div class="api-level"> 1796 1797 1798 1799 1800 </div> 1801 <div class="jd-details-descr"> 1802 1803 1804 1805 1806 <div class="jd-tagdata jd-tagdescr"><p>The extra that contains the ID of the application to launch for an 1807 <code><a href="https://developer.android.com/reference/android/support/v7/media/MediaControlIntent.html#ACTION_START_SESSION">ACTION_START_SESSION</a></code> 1808 request. The value is expected to be a String. 1809</p></div> 1810 1811 1812 <div class="jd-tagdata"> 1813 <span class="jd-tagtitle">Constant Value: </span> 1814 <span> 1815 1816 "com.google.android.gms.cast.EXTRA_CAST_APPLICATION_ID" 1817 1818 </span> 1819 </div> 1820 1821 </div> 1822</div> 1823 1824 1825 1826<A NAME="EXTRA_CAST_LANGUAGE_CODE"></A> 1827 1828<div class="jd-details api apilevel-"> 1829 <h4 class="jd-details-title"> 1830 <span class="normal"> 1831 public 1832 static 1833 final 1834 String 1835 </span> 1836 EXTRA_CAST_LANGUAGE_CODE 1837 </h4> 1838 <div class="api-level"> 1839 1840 1841 1842 1843 </div> 1844 <div class="jd-details-descr"> 1845 1846 1847 1848 1849 <div class="jd-tagdata jd-tagdescr"><p>The extra that indicates the language to be used by the receiver application. May be 1850 included in an 1851 <code><a href="https://developer.android.com/reference/android/support/v7/media/MediaControlIntent.html#ACTION_START_SESSION">ACTION_START_SESSION</a></code> 1852 request. The value is expected to be a language tag in RFC-5646 format; a tag can be 1853 constructed from an <code><a href="/reference/java/util/Locale.html">Locale</a></code> object using 1854 <code><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#languageTagForLocale(java.util.Locale)">languageTagForLocale(Locale)</a></code>. 1855</p></div> 1856 1857 1858 <div class="jd-tagdata"> 1859 <span class="jd-tagtitle">Constant Value: </span> 1860 <span> 1861 1862 "com.google.android.gms.cast.EXTRA_CAST_LANGUAGE_CODE" 1863 1864 </span> 1865 </div> 1866 1867 </div> 1868</div> 1869 1870 1871 1872<A NAME="EXTRA_CAST_RELAUNCH_APPLICATION"></A> 1873 1874<div class="jd-details api apilevel-"> 1875 <h4 class="jd-details-title"> 1876 <span class="normal"> 1877 public 1878 static 1879 final 1880 String 1881 </span> 1882 EXTRA_CAST_RELAUNCH_APPLICATION 1883 </h4> 1884 <div class="api-level"> 1885 1886 1887 1888 1889 </div> 1890 <div class="jd-details-descr"> 1891 1892 1893 1894 1895 <div class="jd-tagdata jd-tagdescr"><p>The extra that indicates whether the application should be relaunched if it is already 1896 running (the default behavior) or whether an attempt should be made to join the application 1897 first. May be included in an 1898 <code><a href="https://developer.android.com/reference/android/support/v7/media/MediaControlIntent.html#ACTION_START_SESSION">ACTION_START_SESSION</a></code> 1899 request. The value is expected to be a boolean. 1900</p></div> 1901 1902 1903 <div class="jd-tagdata"> 1904 <span class="jd-tagtitle">Constant Value: </span> 1905 <span> 1906 1907 "com.google.android.gms.cast.EXTRA_CAST_RELAUNCH_APPLICATION" 1908 1909 </span> 1910 </div> 1911 1912 </div> 1913</div> 1914 1915 1916 1917<A NAME="EXTRA_CAST_STOP_APPLICATION_WHEN_SESSION_ENDS"></A> 1918 1919<div class="jd-details api apilevel-"> 1920 <h4 class="jd-details-title"> 1921 <span class="normal"> 1922 public 1923 static 1924 final 1925 String 1926 </span> 1927 EXTRA_CAST_STOP_APPLICATION_WHEN_SESSION_ENDS 1928 </h4> 1929 <div class="api-level"> 1930 1931 1932 1933 1934 </div> 1935 <div class="jd-details-descr"> 1936 1937 1938 1939 1940 <div class="jd-tagdata jd-tagdescr"><p>The extra that indicates that the receiver application should be stopped when the session 1941 ends. May be included in an 1942 <code><a href="https://developer.android.com/reference/android/support/v7/media/MediaControlIntent.html#ACTION_START_SESSION">ACTION_START_SESSION</a></code> 1943 request. The value is expected to be a boolean. 1944</p></div> 1945 1946 1947 <div class="jd-tagdata"> 1948 <span class="jd-tagtitle">Constant Value: </span> 1949 <span> 1950 1951 "com.google.android.gms.cast.EXTRA_CAST_STOP_APPLICATION_WHEN_SESSION_ENDS" 1952 1953 </span> 1954 </div> 1955 1956 </div> 1957</div> 1958 1959 1960 1961<A NAME="EXTRA_CUSTOM_DATA"></A> 1962 1963<div class="jd-details api apilevel-"> 1964 <h4 class="jd-details-title"> 1965 <span class="normal"> 1966 public 1967 static 1968 final 1969 String 1970 </span> 1971 EXTRA_CUSTOM_DATA 1972 </h4> 1973 <div class="api-level"> 1974 1975 1976 1977 1978 </div> 1979 <div class="jd-details-descr"> 1980 1981 1982 1983 1984 <div class="jd-tagdata jd-tagdescr"><p>The extra that contains a compact JSON string of custom data to pass with a media request. 1985</p></div> 1986 1987 1988 <div class="jd-tagdata"> 1989 <span class="jd-tagtitle">Constant Value: </span> 1990 <span> 1991 1992 "com.google.android.gms.cast.EXTRA_CUSTOM_DATA" 1993 1994 </span> 1995 </div> 1996 1997 </div> 1998</div> 1999 2000 2001 2002<A NAME="EXTRA_DEBUG_LOGGING_ENABLED"></A> 2003 2004<div class="jd-details api apilevel-"> 2005 <h4 class="jd-details-title"> 2006 <span class="normal"> 2007 public 2008 static 2009 final 2010 String 2011 </span> 2012 EXTRA_DEBUG_LOGGING_ENABLED 2013 </h4> 2014 <div class="api-level"> 2015 2016 2017 2018 2019 </div> 2020 <div class="jd-details-descr"> 2021 2022 2023 2024 2025 <div class="jd-tagdata jd-tagdescr"><p>The extra that indicates whether debug logging should be enabled for the Cast session. The 2026 value is expected to be a boolean. 2027</p></div> 2028 2029 2030 <div class="jd-tagdata"> 2031 <span class="jd-tagtitle">Constant Value: </span> 2032 <span> 2033 2034 "com.google.android.gms.cast.EXTRA_DEBUG_LOGGING_ENABLED" 2035 2036 </span> 2037 </div> 2038 2039 </div> 2040</div> 2041 2042 2043 2044<A NAME="EXTRA_ERROR_CODE"></A> 2045 2046<div class="jd-details api apilevel-"> 2047 <h4 class="jd-details-title"> 2048 <span class="normal"> 2049 public 2050 static 2051 final 2052 String 2053 </span> 2054 EXTRA_ERROR_CODE 2055 </h4> 2056 <div class="api-level"> 2057 2058 2059 2060 2061 </div> 2062 <div class="jd-details-descr"> 2063 2064 2065 2066 2067 <div class="jd-tagdata jd-tagdescr"><p>An error bundle extra for the error code. The value is an integer, and will be one of the 2068 <code>ERROR_CODE_*</code> constants declared in this class. 2069</p></div> 2070 2071 2072 <div class="jd-tagdata"> 2073 <span class="jd-tagtitle">Constant Value: </span> 2074 <span> 2075 2076 "com.google.android.gms.cast.EXTRA_ERROR_CODE" 2077 2078 </span> 2079 </div> 2080 2081 </div> 2082</div> 2083 2084 2085 2086 2087<!-- Fields --> 2088 2089 2090<!-- Public ctors --> 2091 2092 2093 2094<!-- ========= CONSTRUCTOR DETAIL ======== --> 2095<!-- Protected ctors --> 2096 2097 2098 2099<!-- ========= METHOD DETAIL ======== --> 2100<!-- Public methdos --> 2101 2102<h2>Public Methods</h2> 2103 2104 2105 2106<A NAME="categoryForCast(java.lang.String)"></A> 2107 2108<div class="jd-details api apilevel-"> 2109 <h4 class="jd-details-title"> 2110 <span class="normal"> 2111 public 2112 static 2113 2114 2115 2116 String 2117 </span> 2118 <span class="sympad">categoryForCast</span> 2119 <span class="normal">(String applicationId)</span> 2120 </h4> 2121 <div class="api-level"> 2122 <div></div> 2123 2124 2125 2126 </div> 2127 <div class="jd-details-descr"> 2128 2129 2130 2131 2132 <div class="jd-tagdata jd-tagdescr"><p>Returns a custom control category for discovering Cast devices that support running the 2133 specified app, independent of whether the app is running or not.</p></div> 2134 <div class="jd-tagdata"> 2135 <h5 class="jd-tagtitle">Parameters</h5> 2136 <table class="jd-tagtable"> 2137 <tr> 2138 <th>applicationId</td> 2139 <td>The application ID of the receiver application.</td> 2140 </tr> 2141 </table> 2142 </div> 2143 <div class="jd-tagdata"> 2144 <h5 class="jd-tagtitle">Throws</h5> 2145 <table class="jd-tagtable"> 2146 <tr> 2147 <th>IllegalArgumentException</td> 2148 <td>If <code>applicationId</code> is <code>null</code>. 2149</td> 2150 </tr> 2151 </table> 2152 </div> 2153 2154 </div> 2155</div> 2156 2157 2158<A NAME="categoryForCast(java.lang.String, java.util.Collection<java.lang.String>)"></A> 2159 2160<div class="jd-details api apilevel-"> 2161 <h4 class="jd-details-title"> 2162 <span class="normal"> 2163 public 2164 static 2165 2166 2167 2168 String 2169 </span> 2170 <span class="sympad">categoryForCast</span> 2171 <span class="normal">(String applicationId, Collection<String> namespaces)</span> 2172 </h4> 2173 <div class="api-level"> 2174 <div></div> 2175 2176 2177 2178 </div> 2179 <div class="jd-details-descr"> 2180 2181 2182 2183 2184 <div class="jd-tagdata jd-tagdescr"><p>Returns a custom control category for discovering Cast devices meeting <em>both</em> 2185 application ID and namespace restrictions. See <code><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#categoryForCast(java.util.Collection<java.lang.String>)">categoryForCast(Collection)</a></code> and 2186 <code><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#categoryForCast(java.lang.String)">categoryForCast(String)</a></code> for more details.</p></div> 2187 <div class="jd-tagdata"> 2188 <h5 class="jd-tagtitle">Throws</h5> 2189 <table class="jd-tagtable"> 2190 <tr> 2191 <th>IllegalArgumentException</td> 2192 <td>If either of the parameters is <code>null</code>. 2193</td> 2194 </tr> 2195 </table> 2196 </div> 2197 2198 </div> 2199</div> 2200 2201 2202<A NAME="categoryForCast(java.util.Collection<java.lang.String>)"></A> 2203 2204<div class="jd-details api apilevel-"> 2205 <h4 class="jd-details-title"> 2206 <span class="normal"> 2207 public 2208 static 2209 2210 2211 2212 String 2213 </span> 2214 <span class="sympad">categoryForCast</span> 2215 <span class="normal">(Collection<String> namespaces)</span> 2216 </h4> 2217 <div class="api-level"> 2218 <div></div> 2219 2220 2221 2222 </div> 2223 <div class="jd-details-descr"> 2224 2225 2226 2227 2228 <div class="jd-tagdata jd-tagdescr"><p>Returns a custom control category for discovering Cast devices currently running an 2229 application which supports the specified namespaces. Apps supporting additional namespaces 2230 beyond those specified here are still considered supported.</p></div> 2231 <div class="jd-tagdata"> 2232 <h5 class="jd-tagtitle">Throws</h5> 2233 <table class="jd-tagtable"> 2234 <tr> 2235 <th>IllegalArgumentException</td> 2236 <td>If <code>namespaces</code> is <code>null</code>. 2237</td> 2238 </tr> 2239 </table> 2240 </div> 2241 2242 </div> 2243</div> 2244 2245 2246<A NAME="categoryForRemotePlayback(java.lang.String)"></A> 2247 2248<div class="jd-details api apilevel-"> 2249 <h4 class="jd-details-title"> 2250 <span class="normal"> 2251 public 2252 static 2253 2254 2255 2256 String 2257 </span> 2258 <span class="sympad">categoryForRemotePlayback</span> 2259 <span class="normal">(String applicationId)</span> 2260 </h4> 2261 <div class="api-level"> 2262 <div></div> 2263 2264 2265 2266 </div> 2267 <div class="jd-details-descr"> 2268 2269 2270 2271 2272 <div class="jd-tagdata jd-tagdescr"><p>Returns a custom control category for discovering Cast devices which support the default 2273 Android remote playback actions using the specified Cast player. If the Default Media 2274 Receiver is desired, use <code><a href="/reference/com/google/android/gms/cast/CastMediaControlIntent.html#DEFAULT_MEDIA_RECEIVER_APPLICATION_ID">DEFAULT_MEDIA_RECEIVER_APPLICATION_ID</a></code> as the 2275 <code>applicationId</code>.</p></div> 2276 <div class="jd-tagdata"> 2277 <h5 class="jd-tagtitle">Parameters</h5> 2278 <table class="jd-tagtable"> 2279 <tr> 2280 <th>applicationId</td> 2281 <td>The application ID of the receiver application.</td> 2282 </tr> 2283 </table> 2284 </div> 2285 <div class="jd-tagdata"> 2286 <h5 class="jd-tagtitle">Throws</h5> 2287 <table class="jd-tagtable"> 2288 <tr> 2289 <th>IllegalArgumentException</td> 2290 <td>If <code>applicationId</code> is <code>null</code>. 2291</td> 2292 </tr> 2293 </table> 2294 </div> 2295 2296 </div> 2297</div> 2298 2299 2300<A NAME="categoryForRemotePlayback()"></A> 2301 2302<div class="jd-details api apilevel-"> 2303 <h4 class="jd-details-title"> 2304 <span class="normal"> 2305 public 2306 static 2307 2308 2309 2310 String 2311 </span> 2312 <span class="sympad">categoryForRemotePlayback</span> 2313 <span class="normal">()</span> 2314 </h4> 2315 <div class="api-level"> 2316 <div></div> 2317 2318 2319 2320 </div> 2321 <div class="jd-details-descr"> 2322 2323 2324 2325 2326 <div class="jd-tagdata jd-tagdescr"><p>Returns a custom control category for discovering Cast devices which support the Default 2327 Media Receiver. 2328</p></div> 2329 2330 </div> 2331</div> 2332 2333 2334<A NAME="languageTagForLocale(java.util.Locale)"></A> 2335 2336<div class="jd-details api apilevel-"> 2337 <h4 class="jd-details-title"> 2338 <span class="normal"> 2339 public 2340 static 2341 2342 2343 2344 String 2345 </span> 2346 <span class="sympad">languageTagForLocale</span> 2347 <span class="normal">(Locale locale)</span> 2348 </h4> 2349 <div class="api-level"> 2350 <div></div> 2351 2352 2353 2354 </div> 2355 <div class="jd-details-descr"> 2356 2357 2358 2359 2360 <div class="jd-tagdata jd-tagdescr"><p>Returns an RFC-5646 language tag string fo the given locale. 2361</p></div> 2362 2363 </div> 2364</div> 2365 2366 2367 2368 2369 2370<!-- ========= METHOD DETAIL ======== --> 2371 2372 2373 2374<!-- ========= END OF CLASS DATA ========= --> 2375<A NAME="navbar_top"></A> 2376 2377<div id="footer" class="wrap" > 2378 2379 2380 <div id="copyright"> 2381 2382 Except as noted, this content is licensed under <a 2383 href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. 2384 For details and restrictions, see the <a href="/license.html"> 2385 Content License</a>. 2386 </div> 2387 <div id="build_info"> 2388 2389<script src="/timestamp.js" type="text/javascript"></script> 2390<script>document.write(BUILD_TIMESTAMP)</script> 2391 2392 </div> 2393 2394 2395 <div id="footerlinks"> 2396 2397 <p> 2398 <a href="/about/index.html">About Android</a> | 2399 <a href="/legal.html">Legal</a> | 2400 <a href="/support.html">Support</a> 2401 </p> 2402 </div> 2403 2404</div> <!-- end footer --> 2405</div> <!-- jd-content --> 2406 2407</div><!-- end doc-content --> 2408 2409</div> <!-- end body-content --> 2410 2411 2412 2413 2414 2415 2416</body> 2417</html> 2418