I'm working with Google Cast API v3 and I want to re-connect the cast device automatically if the last device that was used is available, I was able to do this on Google Cast API v2 using MediaRouter but I can't find a way to do so in V3 using SessionManager.
Looking at the google documentation, the only posible way I see is using SessionManager.startSession(Intent startSessionIntent) but I can't find any documentation into how to create that starSessionIntent.
This is the only example of code I could find related to this method in the google documentation, but it doesn't have any details into the
Intent intent = getIntent();
// You need define your own intent filter and figure out how
// to check if the intent is for joining a cast session.
if (intentIsForStartingSession(intent)) {
CastContext castContext = CastContext.getSharedInstance(this);
castContext.getSessionManager().startSession(intent);
}