I am creating app which required to communicate over live video call. For this i used (https://tokbox.com/developer/sdks/android/) Tokbox API (Vonage API). Bottom right corner camera is my camera. And Full screen camera is opponent camera.
Issue: When i run the app in android 8 OS version. It perfectly works fine It shows both video. When i run the app in android 10 OS version it hide my own bottom corner video when opponent video call.
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorWhite">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/mPublisherViewContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<ImageView
android:id="@+id/imgNoAttendees"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_10sdp"
android:src="@drawable/no_participant"
app:layout_constraintBottom_toTopOf="@+id/txtWaitAttendees" />
<com.app.readyb.customview.textview.CustomTextAxiReg
android:id="@+id/txtWaitAttendees"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textColor="@color/colorBlack"
android:textSize="@dimen/_12ssp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imgNoAttendees"
app:layout_constraintTop_toTopOf="parent" />
<RelativeLayout
android:id="@+id/relativeVideo"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<RelativeLayout
android:id="@+id/relPublisherView"
android:layout_width="@dimen/_100sdp"
android:layout_height="@dimen/_130sdp"
android:layout_gravity="end|bottom"
android:layout_marginBottom="@dimen/_15sdp"
android:padding="@dimen/_10sdp" />
<include layout="@layout/cm_bottom_sheet_persistent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Android OS 8 Screenshot
Android OS 10 Screenshot
Sorry, I don't like to give an answer to my own question but I want to do it because it will help other developers.
This line I need to add in after session connected.
if (mPublisher.getView() instanceof GLSurfaceView) {
((GLSurfaceView) mPublisher.getView()).setZOrderOnTop(true);
}