added phonegap ref