Skip to content

Commit

Permalink
fix(android): add space between default useragent and custom AppendUs…
Browse files Browse the repository at this point in the history
…erAgent (#861)

cordova-android adds a space between the default user agent and the custom one:
https://github.com/apache/cordova-android/blob/c144c0811249e22f91253ef919cc767f892a8fdf/framework/src/org/apache/cordova/engine/SystemWebViewEngine.java#L214

With this change cordova-androids and the IAB user agent are exactly the same.
  • Loading branch information
NiklasMerz committed Jun 23, 2021
1 parent 2fef304 commit 9bc8f76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/android/InAppBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ public void postMessage(String data) {
settings.setUserAgentString(overrideUserAgent);
}
if (appendUserAgent != null) {
settings.setUserAgentString(settings.getUserAgentString() + appendUserAgent);
settings.setUserAgentString(settings.getUserAgentString() + " " + appendUserAgent);
}

//Toggle whether this is enabled or not!
Expand Down

0 comments on commit 9bc8f76

Please sign in to comment.