twilio / twilio-video-app-android

A collaboration application built with the Twilio Video Android SDK
Apache License 2.0
245 stars 98 forks source link

Handle Orientational Changes for room #262

Closed Suyash171 closed 7 months ago

Suyash171 commented 2 years ago

I have used a different layout for the landscape view which needs to restart the activity and recreate things. In this use case, it recreates everything using localVideoTrack, AudioTrack, Room etc. Is there any solution to handle/ Save instances during orientation, so that their could not be any glitch during recreating it again

seancoleman2 commented 1 year ago

Hi @Suyash171, can you provide some more information on what you are trying to do and the expected behavior vs. what is happening? Code snippets, errors, a screen recording of what it looks like when you switch to landscape would all be helpful. Would love to help but will need some more info. Thanks!

afalls-twilio commented 7 months ago

@seancoleman2 Unfortunately, one can not easily recreate the session when streaming. The recommended solution is to not associate your video code (track creation, connection management, etc) with a fragment and instead either have it associated with the underlying activity or a service.