Skip to content

Commit 9bc8f76

Browse files
authored
fix(android): add space between default useragent and custom AppendUserAgent (apache#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.
1 parent 2fef304 commit 9bc8f76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/android/InAppBrowser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ public void postMessage(String data) {
970970
settings.setUserAgentString(overrideUserAgent);
971971
}
972972
if (appendUserAgent != null) {
973-
settings.setUserAgentString(settings.getUserAgentString() + appendUserAgent);
973+
settings.setUserAgentString(settings.getUserAgentString() + " " + appendUserAgent);
974974
}
975975

976976
//Toggle whether this is enabled or not!

0 commit comments

Comments
 (0)