Leonel Folmer
Leonel Folmer

Reputation: 211

GCKDeviceManager Class : joinApplication:sessionID

I'm trying to understand the purpose of this function. With this function I can connect two applications? I mean two different senders/iOS app to one receiver?

An example would be great, thanks.

I am using this example: https://github.com/googlecast/CastVideos-ios

Upvotes: 0

Views: 228

Answers (2)

Ali Naddaf
Ali Naddaf

Reputation: 19074

To complement Leon's comment, in most case, your sender can simply use launchApplication; this method takes a parameter that determines whether to reuse a running session or re-launch even if a session is currently going on for the same application. In a typical use case, a sender at start up just uses this method and sets the parameter to not start a new session if one is already running. In other words, it starts the application if it is not already running or joins if it is already running. joinApplication is mostly used when you want to reconnect yourself after an implicit disconnect.

Upvotes: 0

Leon Nicholls
Leon Nicholls

Reputation: 4656

Cast receivers can have multiple senders connected at a time. Typically you use joinApplication to join a receiver application already running on the Cast device. If you have persisted the sessionId, then this will attempt to rejoin that session. If the session is no longer the same or another app is running, then this will fail.

Upvotes: 1

Related Questions