Handle service calls from example phonegap application