Adding PhoneGap plugin code