added phone gap sample code