add code for phoneGap