Modified for PhoneGap Builde