Refactored CastService and CastWebAppSession to reduce the inconsistency with iOS