title: Appcelerator Hyperloop use TiApplication Class
body: <p>I am trying to use Hyperloop to use the <code>isCurrentActivityInForeground</code> method inside <code>org.appcelerator.titanium.TiApplication</code></p>
  
  <p><a href="https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java" rel="nofollow noreferrer">https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java</a></p>
  
  <p>I have tried the following and some other ways but I am unable to require the class - Any suggestions? </p>
  
  <pre><code>var TiApplicationClass = require('org.appcelerator.titanium.TiApplication');
  var TiApplication = new TiApplicationClass;
  var isInForeground = TiApplication.isCurrentActivityInForeground();
  
  Ti.API.log("isInForeground");
  Ti.API.log(isInForeground);
  </code></pre>
  
  <p>PS. I have asked in the slack channels multiple times but no help</p>