title: Access the current android activity
body: <p>How can I access the current Android activity class?</p>
  
  <p>I am using the necessitas framework (QT in Android). Basically, using the Android NDK an activity calls a QT application (.so). All runs fine. Now I am working on some bindings to access the GPS from the QT application. From some java examples that access the GPS I saw that the most vital part is to allow access to the GPS service:</p>
  
  <p>LocationManager lm;
  lm = (LocationManager) getSystemService(LOCATION_SERVICE);</p>
  
  <p>Here getSystemService is a method of class activity. Because I am using the JNI inside the QT application I need to access the current activity that is running my QT application, so I can call the function getSystemService.</p>
  
  <p>So the question is. How do I get the current activity where my QT application is running from?</p>