Upated phonegap plugin api