Wrote phonegap app