-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: get original user agent. #94
Comments
I would like this too, I had to use OverrideUserAgent to solve a login problem with google and after that the pieces of my code that verify the device through the plugin do not return the information of the device correctly anymore. |
@renatoflorencia hehe, same exact thing here with google login and to solve it I added the ability of getting original user agent in my custom cordova plugin |
That would be great. For the moment, |
This wouldn't be the original user agent used by the webview. It would be the user agent used by the JVM. So I don't think this is a solution. Android does have getDefaultUserAgent, this would be a proper solution I think. I'm not sure if iOS has any equivalent API or even access to the user agent to store a reference.... and that would be a blocker. I believe iOS only has access to the custom user agent which will be
The JS |
The browser user agent has a lot of information. If it was overriden by OverrideUserAgent cordova preference then there is no way to get the original user agent from javascript. It would be nice if this plugin would also have a property for the original user agent.
ios possible implementation
https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/Public/CDVUserAgentUtil.m#L37
android possible implementation
https://stackoverflow.com/questions/4103963/is-there-a-way-to-obtain-the-default-user-agent-string-aside-from-webview-getset/10248817#10248817
The text was updated successfully, but these errors were encountered: