2016-11-07 24 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); 
相關問題