В моем приложении реализован режим pip, в котором я открываю элемент PIP из пункта меню навигации. Режим pip работает нормально, но когда я нажимаю на любой другой элемент в меню, logcat показывает сообщение handleWindowVisibility: нет активности для токена android .os. BinderProxy@8ef8d1f
Ниже приведена ссылка i сослались.
Ссылка
BaseActivityHelper.cs
relativeImageGallery.Click += (sender, e) =>
{
var pip_activity = new Intent(_activity, typeof(PictureinPictureActivity));
pip_activity.PutExtra("videoUrl", "http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8"/*"rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"*/);
_activity.StartActivity(pip_activity);
};
PictureinPictureActivity.cs
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.PictureinPictureMode);
tb = FindViewById<Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
vv = FindViewById<VideoView>(Resource.Id.videoView);
SetSupportActionBar(tb);
setVideoView(Intent);
mediaController = new MediaController(this);
// Create your application here
pip = FindViewById<TextView>(Resource.Id.pip);
progressBar = FindViewById<ProgressBar>(Resource.Id.indeterminateBar);
vv.SetMediaController(mediaController);
vv.SetOnPreparedListener(this);
vv.SetOnTouchListener(new OnSwipeTouchListener(this, pictureInPictureParamsBuilder, vv));
pip.SetTypeface(FontFactory.GetFontAwesome(this), TypefaceStyle.Normal);
pip.Text = "\uf063";
}
Базовая активность
public class BaseActivity:SlidingFragmentActivity
{
public static bool IsBackButtonPressedOnce = false;
const int CAMERA_REQUEST = 1;
const int StORAGE_REQUEST = 2;
const int CHECK_IN_REQUEST = 3;
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
RequestWindowFeature (WindowFeatures.NoTitle);
SetBehindContentView(Resource.Layout.menu_frame);
/*
* Support of scaling for lower end devices
* This method is called only if the device Api Should be less than Nougat and the font scale should be greater than 1.5
*
* */
SetTabletFontScaling();
Util.StatusBarColor(this);
BaseActivityHelper baseActivityHelper = new BaseActivityHelper(this, SlidingMenu);
baseActivityHelper.OnCreateHelper();
}
Примечание: Эта проблема возникает только в Android Q