Have you looked at the window control object?
I had not actually, I wasn't sure it would be comparable for mobile. I'll check