Attempt to make phonegap plugin work