Testing code for PhoneGap