title: How to access Activity from a React Native Android module?
body: <p>I'm attempting to bridge over the Android functionality of keeping the screen on to React Native. I figured I could do this with a simple module, however I don't know how to get access to the current Android Activity from said module.</p>
  
  <p>I need the Activity reference so I can call <code>.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);</code> on it</p>
  
  <p>I tried to get the activity via casting like so <code>((Activity)getReactApplicationContext().getBaseContext())</code>, but this throws a "cannot be cast to Android.app.Activity" error</p>