Adding the PhoneGap code for real this time.