//check if we're in directConnect mode
if (app.isDirectConnectEnabled()) {
// we're running in development mode; try to get the i.p. address; if it's not 127.0.0.1, we'll include the notify_url parameter; .local. means we're running locally under rendezvous
if (app.host().equals("localhost") || app.host().indexOf(".local.") != -1) {
if (app.hostAddress().getHostAddress().equals("127.0.0.1")) {
// probably not connected to internet
return "testing_mode"; //just so we can see this method working
} else {
//get protocol
String protocol = app.cgiAdaptorURL().substring(0, app.cgiAdaptorURL().indexOf(":"));