In my service I add a view to WindowManager with addView(). When I\'m ready to hide the view, I call removeView() using the View
WindowManager
addView()
removeView()
View
Check that the views parent != null before trying to remove it.
if(mView.getParent() != null){ wm.removeView(mView); }