react-native-pip-android icon indicating copy to clipboard operation
react-native-pip-android copied to clipboard

Display PIP view after app goes in background

Open Shahfaisal-0304 opened this issue 2 years ago • 1 comments

I want to start PIP mode when the application moves to the background state. In some devices AppState's change listener reflects before the application fully moves to the background in those cases I'm able to start PIP mode but in Android 13 devices, the "change" listener reflects when the application completely moves to the background at that time PIP mode view is not getting visible.

Shahfaisal-0304 avatar Nov 07 '23 09:11 Shahfaisal-0304

I figured out the issue, If I update any state or dispatch action above PipHandler.enterPipMode the PiP view will not be visible on swipe mode.

Out of the topic: If we use any library to display toast messages in the app, toast messages appear before PipHandler.enterPipMode will display in PIP View, to avoid this issue use ToastAndroid.

Shahfaisal-0304 avatar Nov 24 '23 07:11 Shahfaisal-0304