Create a Service that uses the Context.createDisplayContext(Display) to obtain a new Window manager for your secondary display - this is how Presentation works
take a look at this link as an example: http://www.java2s.com/Open-Source/Android/android-core/platform-frameworks-base/com/android/server/LoadAverageService.java.htm
In onCreate() instead of getting the WindowManagerImpl:
public void onCreate(){
...
WindowManagerImpl wm = (WindowManagerImpl)getSystemService(WINDOW_SERVICE);
wm.addView(mView, params);
}
call a method like this:
private void addView(WindowManager.LayoutParams params){
DisplayManager dm = (DisplayManager) getApplicationContext().getSystemService(DISPLAY_SERVICE);
if (dm != null){
Display dispArray[] = dm.getDisplays();
if (dispArray.length>0){
Context displayContext = getApplicationContext().createDisplayContext(dispArray[1]);
WindowManager wm = (WindowManager)displayContext.getSystemService(WINDOW_SERVICE);
wm.addView(mView, params);
}
}
}
Your view will be added to the secondary display and since this runs by a Service, your activity running on the main display is not paused