title: Android - How to get my 3rd party library to access a generic view hierarchy
body: <p>I'm building an Android library that is suppose to iterate through the app, and print it's view hierarchy.</p>
  
  <p>Obviously, I'm trying to build it as seamlessly as possible to the developer.</p>
  
  <p>My strategy for iOS is to ask the developer to 'init' my SDK upon launch, and run a background thread that polls the root window and looks for UI elements on the controller.</p>
  
  <p>In Android, I want to keep the same strategy, but found it hard to get access to the root Activity, since Android doesn't allow this type of action.</p>
  
  <p>Any help will be much appreciated! </p>