I am trying to use Hyperloop to use the isCurrentActivityInForeground
method inside org.appcelerator.titanium.TiApplication
I have tried the following and some other ways but I am unable to require the class - Any suggestions?
var TiApplicationClass = require('org.appcelerator.titanium.TiApplication');
var TiApplication = new TiApplicationClass;
var isInForeground = TiApplication.isCurrentActivityInForeground();
Ti.API.log("isInForeground");
Ti.API.log(isInForeground);
PS. I have asked in the slack channels multiple times but no help