added phonegap code.