Implementing phonegap plugins example