PhoneGap Connection API