GCKLaunchOptions Class
Stay organized with collections
Save and categorize content based on your preferences.
Receiver application launch options.
Inherits NSObject, <NSCopying>, and <NSCoding>.
Initializes the object with default values.
- (instancetype) initWithRelaunchIfRunning: |
|
(BOOL) |
relaunchIfRunning |
|
Initializes the object with the sender device's language code and the specified relaunch behavior.
- (instancetype) initWithLanguageCode: |
|
(NSString *__nullable) |
languageCode |
relaunchIfRunning: |
|
(BOOL) |
relaunchIfRunning |
|
|
| |
Designated initializer.
Initializes the object with the specified language code and relaunch behavior.
- Parameters
-
languageCode | The language code as per RFC 5646. |
relaunchIfRunning | A flag indicating whether the receiver application should be relaunched if it is already running. |
- (NSString*) languageCode |
|
readwritenonatomiccopy |
The sender's language code as per RFC 5646.
The default is the sender device's language.
- (BOOL) relaunchIfRunning |
|
readwritenonatomicassign |
A flag indicating whether the receiver application should be relaunched if it is already running.
The default is NO
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["\u003cp\u003e\u003ccode\u003eGCKLaunchOptions\u003c/code\u003e objects are used to specify how a receiver application is launched on a Cast device.\u003c/p\u003e\n"],["\u003cp\u003eThese options include the sender's language code and whether to relaunch the receiver application if it's already running.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGCKLaunchOptions\u003c/code\u003e provides three initializers to set these options with varying levels of customization.\u003c/p\u003e\n"],["\u003cp\u003eYou can access and modify the \u003ccode\u003elanguageCode\u003c/code\u003e and \u003ccode\u003erelaunchIfRunning\u003c/code\u003e properties of a \u003ccode\u003eGCKLaunchOptions\u003c/code\u003e instance.\u003c/p\u003e\n"],["\u003cp\u003eBy default, the receiver application will not be relaunched if it is already running, and the language code will be the sender device's language.\u003c/p\u003e\n"]]],["The GCKLaunchOptions class manages receiver application launch settings. Key actions include initializing the object with default values, the device's language code, and a specified relaunch behavior. The designated initializer accepts both a language code and a relaunch flag. Properties include `languageCode`, which follows RFC 5646 and defaults to the sender's language, and `relaunchIfRunning`, a boolean indicating whether to relaunch an already running application, defaulting to `NO`.\n"],null,["# GCKLaunchOptions Class\n\n[Instance Methods](#pub-methods) \\| [Properties](#properties) \nGCKLaunchOptions Class Reference \n\nOverview\n--------\n\nReceiver application launch options.\n\nInherits NSObject, \\\u003cNSCopying\\\u003e, and \\\u003cNSCoding\\\u003e.\n\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (instancetype) | - [init](/cast/v3/reference/ios/interface_g_c_k_launch_options#a517758eee4ced6050e6c1828f2dd99ff) |\n| | Initializes the object with default values. [More...](#a517758eee4ced6050e6c1828f2dd99ff) |\n| ||\n| (instancetype) | - [initWithRelaunchIfRunning:](/cast/v3/reference/ios/interface_g_c_k_launch_options#aaffd323b75c8c8575cd11117c176878b) |\n| | Initializes the object with the sender device's language code and the specified relaunch behavior. [More...](#aaffd323b75c8c8575cd11117c176878b) |\n| ||\n| (instancetype) | - [initWithLanguageCode:relaunchIfRunning:](/cast/v3/reference/ios/interface_g_c_k_launch_options#aeb3de5baa2a2bd9e822158b4b060281c) |\n| | Designated initializer. [More...](#aeb3de5baa2a2bd9e822158b4b060281c) |\n| ||\n\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| Property Summary ---------------- ||\n| NSString \\* | [languageCode](/cast/v3/reference/ios/interface_g_c_k_launch_options#a945553da0a01cb4bfd16ca587f21bc08) |\n| | The sender's language code as per RFC 5646. [More...](#a945553da0a01cb4bfd16ca587f21bc08) |\n| ||\n| BOOL | [relaunchIfRunning](/cast/v3/reference/ios/interface_g_c_k_launch_options#a130bec9fa71e880bef4aec51be5dcf56) |\n| | A flag indicating whether the receiver application should be relaunched if it is already running. [More...](#a130bec9fa71e880bef4aec51be5dcf56) |\n| ||\n\nMethod Detail\n-------------\n\n|-----------------------|---|---|---|\n| - (instancetype) init | | | |\n\nInitializes the object with default values. \n\n|---------------------------------------------|---|--------|---------------------|---|\n| - (instancetype) initWithRelaunchIfRunning: | | (BOOL) | *relaunchIfRunning* | |\n\nInitializes the object with the sender device's language code and the specified relaunch behavior. \n\n|----------------------------------------|---|-------------------------|---------------------|\n| - (instancetype) initWithLanguageCode: | | (NSString \\*__nullable) | *languageCode* |\n| relaunchIfRunning: | | (BOOL) | *relaunchIfRunning* |\n| | | | |\n\nDesignated initializer.\n\nInitializes the object with the specified language code and relaunch behavior.\n\nParameters\n:\n\n |-------------------|---------------------------------------------------------------------------------------------------|\n | languageCode | The language code as per RFC 5646. |\n | relaunchIfRunning | A flag indicating whether the receiver application should be relaunched if it is already running. |\n\n\nProperty Detail\n---------------\n\n|-----------------------------------------------------------------|------------------------|\n| |-----------------------------| | - (NSString\\*) languageCode | | readwritenonatomiccopy |\n\nThe sender's language code as per RFC 5646.\n\nThe default is the sender device's language. \n\n|---------------------------------------------------------------|--------------------------|\n| |----------------------------| | - (BOOL) relaunchIfRunning | | readwritenonatomicassign |\n\nA flag indicating whether the receiver application should be relaunched if it is already running.\n\nThe default is `NO`."]]