PhoneGap: Detection was reversed