Adding support for PhoneGap.