2016-11-07 27 views
0

我们有一个服务程序,当计时器过期时,我们的服务显示一项活动。这个活动透明有三个按钮就是它,所以当dtv或其他视频程序活动时我们的活动来黑和DTV或视频暂停我们的问题是我们如何能够在没有暂停或黑屏的情况下播放该活动DTV或视频?DTV播放器和另一个程序活动

编辑

在这里,我怎么称呼活动

Intent intent = new Intent(Application.Context, typeof(AdvActivity)); 
intent.SetFlags(ActivityFlags.NewTask); 
intent.PutExtra("Url", AdsTable.rows[0].ContentUrl); 
intent.PutExtra("Type", AdsTable.rows[0].ContentType); 
intent.PutExtra("Id", AdsTable.rows[0].OID); 
StartActivity(intent); 
+0

你有与多个设备进行测试呢?它显示黑屏时显示任何日志吗?感谢您是否可以分享与您的实施有关的一些代码片段。 –

回答

0

我解决这样也许有人需要

wmParams = new WindowManager.LayoutParams(); 
    mWindowManager = (WindowManager)getApplication().getSystemService(getApplication().WINDOW_SERVICE); 
    wmParams.type = WindowManager.LayoutParams.TYPE_PHONE; 
    wmParams.format = PixelFormat.RGBA_8888; 
    wmParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; 
    wmParams.gravity = Gravity.TOP | Gravity.CENTER; 
    wmParams.x = 0; 
    wmParams.y = 0; 
    wmParams.width = WindowManager.LayoutParams.WRAP_CONTENT; 
    wmParams.height = WindowManager.LayoutParams.WRAP_CONTENT; 
    LayoutInflater inflater = LayoutInflater.from(getApplication()); 
    mFloatLayout = (LinearLayout) inflater.inflate(R.layout.poplayout, null); 
mWindowManager.addView(mFloatLayout, wmParams); 
相关问题