Plugin for Cordova 3.0+ that allows you to change your User-Agent for HTTP requests.
To install the plugin, use the Cordova CLI and enter the following:
cordova plugin add https://github.com/alisiikh/cordova-useragent
- Android
- iOS
To set your User-Agent:
UserAgent.set(userAgent)
To get your current User-Agent:
UserAgent.get(function(userAgent) { /* do smth */ })
To set your User-Agent back to the default:
UserAgent.reset()