Based on PhoneGap template