Closed duEuler closed 1 year ago
I was able to solve it using Example in directory demo is name Mobile Browser, activating option the UserAgent update option, success!
Execute this code, after load webpage:
const
DEVTOOLS_SETUSERAGENTOVERRIDE_MSGID = 1;
DEVTOOLS_SETTOUCHEMULATIONENABLED_MSGID = 2;
DEVTOOLS_CANEMULATE_MSGID = 3;
DEVTOOLS_CLEARDEVICEMETRICSOVERRIDE_MSGID = 4;
DEVTOOLS_SETDEVICEMETRICSOVERRIDE_MSGID = 5;
// ---------- //-----------//
var
TempParams : ICefDictionaryValue;
begin
try
TempParams := TCefDictionaryValueRef.New;
TempParams.SetString('userAgent', 'Mozilla/5.0 (Linux; Android 11; M2102K1G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Mobile Safari/537.36');
FPendingMsgID := DEVTOOLS_SETUSERAGENTOVERRIDE_MSGID;
Chromium1.ExecuteDevToolsMethod(0, 'Emulation.setUserAgentOverride', TempParams);
finally
TempParams := nil;
end;
I'm glad this works in your case. This is the latest forum thread about this issue.
As you can see, Google decided to block all embedded browsers a few years ago but some developers seem to find temporary workarounds.
Thanks for sharing your solution! :)
Try using another browser. If you are already using a supported browser, try logging in again.
I'm trying to log in to a Google account, but it seems Google is blocking browsers that are unsupported or insecure for them, how can we work around this problem?
Grateful for the attention!
Congrats on the project, it turned out great!